﻿CREATE TABLE IF NOT EXISTS `ACCDTBM` (
 `COMP_CODE` varchar(10) NOT NULL ,
 `ACC_CODE` varchar(20) NOT NULL ,
 `ACC_NAME01` varchar(50) DEFAULT NULL,
 `ACC_NAME02` varchar(50) DEFAULT NULL,
 `ACC_NAME03` varchar(50) DEFAULT NULL,
 `ACC_NAME04` varchar(50) DEFAULT NULL,
 `ABBR_NAME` varchar(50) DEFAULT NULL,
 `ACC_TP_CODE` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE01` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE02` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE03` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE04` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE05` varchar(10) DEFAULT NULL,
 `ANAY_FLAG_CODE06` varchar(10) DEFAULT NULL,
 `ACC_OPENING_AMT` decimal(18,6) DEFAULT NULL,
 `PARENT_ACC_CODE` varchar(50) DEFAULT NULL,
 `CASH_FLOW_CLASS` varchar(50) DEFAULT NULL,
 `ACC_CCY_CODE` varchar(50) DEFAULT NULL,
 `INACTIVE_BIT` bit DEFAULT NULL,
 `ACC_DT_BIT` bit DEFAULT NULL,
 `SIGN_CODE` varchar(3) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`COMP_CODE`,`ACC_CODE`),
 KEY `IX_ACCDTBM` (`COMP_CODE`,`ACC_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ADJDTLM` (
 `ADJ_DT` varchar(50) NOT NULL ,
 `ADJ_NO` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ADJ_DT`),
 KEY `IX_ADJDTLM` (`ADJ_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ADJHDTM` (
 `ADJ_NO` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ADJ_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ADJ_NO`),
 KEY `IX_ADJHDTM` (`ADJ_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ALTITEM` (
 `ALT_ITEM` varchar(22) NOT NULL ,
 `ASSM_NO` varchar(22) NOT NULL ,
 `ITEM_NO` varchar(22) NOT NULL ,
 `ALT_LOCX` varchar(50) DEFAULT NULL,
 `ALT_REFX` varchar(50) DEFAULT NULL,
 `ALT_RMKS` longtext DEFAULT NULL,
 `PRI_CODE` varchar(5) DEFAULT NULL,
 `XCHG_QTY` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ALT_ITEM`,`ASSM_NO`,`ITEM_NO`),
 KEY `IX_ALTITEM` (`ALT_ITEM`,`ASSM_NO`,`ITEM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ANAYTBM` (
 `ANAY_CLASS` varchar(50) NOT NULL ,
 `ANAY_CODE` varchar(50) NOT NULL ,
 `ANAY_NAME01` varchar(50) DEFAULT NULL,
 `ANAY_NAME02` varchar(50) DEFAULT NULL,
 `ANAY_NAME03` varchar(50) DEFAULT NULL,
 `ANAY_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`ANAY_CLASS`,`ANAY_CODE`),
 KEY `IX_ANAYTBM` (`ANAY_CLASS`,`ANAY_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `APMDTLM` (
 `APM_DT` varchar(50) NOT NULL ,
 `APM_NO` varchar(50) DEFAULT NULL,
 `ACC_CODE` varchar(50) DEFAULT '(0)',
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `APM_CCY_AMT` decimal(18,8) DEFAULT (0),
 `APM_DET_AMT` decimal(18,8) DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT '(0)',
 `APM_RMKS` longtext DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`APM_DT`),
 KEY `IX_APMDTLM` (`APM_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `APMHDTM` (
 `APM_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(50) DEFAULT NULL,
 `DEPOSIT_BIT` bit DEFAULT NULL,
 `TRANS_DATE` datetime,
 `EFFECT_DATE` datetime,
 `CHQ_NO` varchar(50) DEFAULT NULL,
 `VIV_DATE` datetime,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `AP_ODTP_RMKS` longtext DEFAULT NULL,
 `PAY_CODE` varchar(50) DEFAULT NULL,
 `VIV_AMT` decimal(18,8) DEFAULT NULL,
 `DOC_AMT` decimal(18,8) DEFAULT NULL,
 `POST_DATE` datetime,
 `POST_BIT` bit DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `APM_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`APM_NO`),
 KEY `IX_APMHDTM` (`APM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `APRDTLM` (
 `AP_DT` varchar(50) NOT NULL ,
 `AP_NO` varchar(50) DEFAULT NULL,
 `ACC_CODE` varchar(50) DEFAULT '(0)',
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `AP_CCY_AMT` decimal(18,8) DEFAULT (0),
 `AP_DET_AMT` decimal(18,0) DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT '(0)',
 `AP_RMKS` longtext DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`AP_DT`),
 KEY `IX_APRDTLM` (`AP_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `APRHDTM` (
 `AP_NO` varchar(50) NOT NULL ,
 `VIV_NO` varchar(50) DEFAULT NULL,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(50) DEFAULT NULL,
 `DOC_DATE` datetime,
 `REC_DATE` datetime,
 `DUE_DATE` datetime,
 `VIV_DATE` datetime,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `AP_ODTP_RMKS` longtext DEFAULT NULL,
 `PAY_CODE` varchar(50) DEFAULT NULL,
 `VIV_AMT` decimal(18,8) DEFAULT NULL,
 `DOC_AMT` decimal(18,8) DEFAULT NULL,
 `PAYMENT_AMT` decimal(18,8) DEFAULT NULL,
 `SETTLED_AMT` decimal(18,8) DEFAULT NULL,
 `AP_CCY_AMT` decimal(18,8) DEFAULT NULL,
 `AP_DET_AMT` decimal(18,8) DEFAULT NULL,
 `AP_AMT` decimal(18,8) DEFAULT NULL,
 `PAY_AMT` decimal(18,8) DEFAULT NULL,
 `SET_AMT` decimal(18,8) DEFAULT NULL,
 `POST_DATE` datetime,
 `POST_BIT` bit DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `AP_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`AP_NO`),
 KEY `IX_APRHDTM` (`AP_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `AREDTLM` (
 `ARE_DT` varchar(50) NOT NULL ,
 `ARE_NO` varchar(50) DEFAULT NULL,
 `ACC_CODE` varchar(50) DEFAULT '(0)',
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `ARE_CCY_AMT` decimal(18,8) DEFAULT (0),
 `ARE_DET_AMT` decimal(18,8) DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT '(0)',
 `ARE_RMKS` longtext DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ARE_DT`),
 KEY `IX_AREDTLM` (`ARE_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `AREHDTM` (
 `ARE_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `CHQ_NO` varchar(50) DEFAULT NULL,
 `DEPOSIT_BIT` bit DEFAULT NULL,
 `TRANS_DATE` datetime,
 `EFFECT_DATE` datetime,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `ARE_RMKS` longtext DEFAULT NULL,
 `ARE_ODTP_RMKS` longtext DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `ARE_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `ARE_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ARE_NO`),
 KEY `IX_AREHDTM` (`ARE_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ARVDTLM` (
 `AR_DT` varchar(50) NOT NULL ,
 `AR_NO` varchar(50) DEFAULT NULL,
 `ACC_CODE` varchar(50) DEFAULT '(0)',
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `AR_CCY_AMT` decimal(18,8) DEFAULT (0),
 `AR_DET_AMT` decimal(18,0) DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT '(0)',
 `AR_RMKS` longtext DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`AR_DT`),
 KEY `IX_ARVDTLM` (`AR_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ARVHDTM` (
 `AR_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `IV_NO` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `DUE_DATE` datetime,
 `TRANS_DATE` datetime,
 `IV_DATE` datetime,
 `BANK_IN_DATE` datetime,
 `DN_NO` varchar(50) DEFAULT NULL,
 `SALES_CODE` varchar(50) DEFAULT NULL,
 `LC_NO` varchar(50) DEFAULT NULL,
 `CUS_ORD` varchar(50) DEFAULT NULL,
 `CRT_REF_NO` varchar(50) DEFAULT NULL,
 `LC_AMT` varchar(50) DEFAULT NULL,
 `AR_ODTP_RMKS` longtext DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `GL_NO` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `AR_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `AR_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`AR_NO`),
 KEY `IX_ARVHDTM` (`AR_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ATTRITM` (
 `ATTR_CODE` varchar(12) NOT NULL ,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ATTR_CODE`),
 KEY `IX_ATTRITM` (`ATTR_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ATVITBM` (
 `ATVIT_CODE` varchar(12) NOT NULL ,
 `ATVIT_NAME01` varchar(50) DEFAULT NULL,
 `ATVIT_NAME02` varchar(50) DEFAULT NULL,
 `ATVIT_NAME03` varchar(50) DEFAULT NULL,
 `ATVIT_NAME04` varchar(50) DEFAULT NULL,
 `ATVIT_RMKS` longtext DEFAULT NULL,
 `STAGE_CODE` varchar(20) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ATVIT_CODE`),
 KEY `IX_ATVITBM` (`ATVIT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `AVLMTBM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `VEN_CODE` varchar(12) NOT NULL ,
 `CERT_DATE` datetime,
 `CERT_NO` varchar(50) DEFAULT NULL,
 `STATUS_CODE` varchar(10) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`VEN_CODE`),
 KEY `IX_AVLMTBM` (`ITEM_NO`,`VEN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `BPNRTBM` (
 `BPN_CODE` varchar(50) NOT NULL ,
 `ABBR_NAME` varchar(12) DEFAULT NULL,
 `ACC_CODE01` varchar(50) DEFAULT NULL,
 `ACC_CODE02` varchar(50) DEFAULT NULL,
 `ACC_CODE03` varchar(50) DEFAULT NULL,
 `ACC_CODE04` varchar(50) DEFAULT NULL,
 `ACC_CODE05` varchar(50) DEFAULT NULL,
 `ACC_CODE06` varchar(50) DEFAULT NULL,
 `ACC_CODE07` varchar(50) DEFAULT NULL,
 `ACC_CODE08` varchar(50) DEFAULT NULL,
 `ACC_CODE09` varchar(50) DEFAULT NULL,
 `ACC_CODE10` varchar(50) DEFAULT NULL,
 `ACC_CODE11` varchar(50) DEFAULT NULL,
 `ACC_CODE12` varchar(50) DEFAULT NULL,
 `ALIAS_NAME` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CR_DAY` int,
 `CR_HOLD` bit NOT NULL  DEFAULT (0),
 `CR_LIMIT` decimal(15,8) DEFAULT (0),
 `CR_START` datetime,
 `CRTN_DAYS` int,
 `CRTN_RATE` decimal(18,8) DEFAULT (0),
 `CTRY_CODE` varchar(50) DEFAULT NULL,
 `BPN_ADR01` varchar(50) DEFAULT NULL,
 `BPN_ADR02` varchar(50) DEFAULT NULL,
 `BPN_ADR03` varchar(50) DEFAULT NULL,
 `BPN_ADR04` varchar(50) DEFAULT NULL,
 `BPN_ADR05` varchar(50) DEFAULT NULL,
 `BPN_ADR06` varchar(50) DEFAULT NULL,
 `BPN_ADR07` varchar(50) DEFAULT NULL,
 `BPN_ADR08` varchar(50) DEFAULT NULL,
 `CUS_CBL` varchar(50) DEFAULT NULL,
 `BPN_CONT` varchar(50) DEFAULT NULL,
 `CUS_FAX` varchar(50) DEFAULT NULL,
 `BPN_NAME01` varchar(50) DEFAULT NULL,
 `BPN_NAME02` varchar(50) DEFAULT NULL,
 `BPN_NAME03` varchar(50) DEFAULT NULL,
 `BPN_NAME04` varchar(50) DEFAULT NULL,
 `BPN_NOTE` longtext DEFAULT NULL,
 `CUS_SHIPM` varchar(50) DEFAULT NULL,
 `BPN_TEL` varchar(50) DEFAULT NULL,
 `BPN_TERM` varchar(50) DEFAULT NULL,
 `CUS_TITLE` varchar(50) DEFAULT NULL,
 `BPN_TP_CODE` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `DISC_RATE` decimal(18,8) DEFAULT (0),
 `FORW_CODE` varchar(50) DEFAULT NULL,
 `ORG_CERT` varchar(50) DEFAULT NULL,
 `PFN_RENG` varchar(50) DEFAULT NULL,
 `REGN_CODE` varchar(50) DEFAULT NULL,
 `SALES_CODE` varchar(50) DEFAULT NULL,
 `SHARE_ACC` varchar(1) DEFAULT NULL,
 `SHIP_MARK01` longtext DEFAULT NULL,
 `SHIP_MARK02` longtext DEFAULT NULL,
 `SHORT_NAME` varchar(50) DEFAULT NULL,
 `SIZEG_CODE` varchar(20) DEFAULT NULL,
 `STAF_QTY` decimal(15,8) DEFAULT (0),
 `SVIA_CODE` varchar(50) DEFAULT NULL,
 `TEL_AREA` varchar(50) DEFAULT NULL,
 `TEL_CTRY` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`BPN_CODE`),
 KEY `IX_BPNRTBM` (`BPN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `BUYERTM` (
 `BUYER_CODE` varchar(12) NOT NULL ,
 `BUYER_NAME01` varchar(40) DEFAULT NULL,
 `BUYER_NAME02` varchar(40) DEFAULT NULL,
 `BUYER_NAME03` varchar(40) DEFAULT NULL,
 `BUYER_NAME04` varchar(40) DEFAULT NULL,
 `DIRECT_LINE` varchar(40) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `MAIL_ADDR` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`BUYER_CODE`),
 KEY `IX_BUYERTM` (`BUYER_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CATRTBM` (
 `CAT_CODE` varchar(12) NOT NULL ,
 `ABC_CLASS` varchar(22) DEFAULT NULL,
 `BACK_FLUSH` bit DEFAULT (0),
 `CAT_NAME01` varchar(40) DEFAULT NULL,
 `CAT_NAME02` varchar(40) DEFAULT NULL,
 `CAT_NAME03` varchar(40) DEFAULT NULL,
 `CAT_NAME04` varchar(40) DEFAULT NULL,
 `CLASS_CODE` varchar(22) DEFAULT NULL,
 `LEAD_TM` decimal(15,8) DEFAULT (0),
 `MAX_STK` decimal(15,8) DEFAULT (0),
 `MBC_CODE` varchar(12) DEFAULT NULL,
 `MIN_ORD` decimal(15,8) DEFAULT (0),
 `MIN_STK` decimal(15,8) DEFAULT (0),
 `PKG_ORD` decimal(15,8) DEFAULT (0),
 `PO_ODTP` varchar(12) DEFAULT NULL,
 `SCP_FACT` decimal(15,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_ENG` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CAT_CODE`),
 KEY `IX_CATRTBM` (`CAT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CCYRTBH` (
 `CCY_CODE` varchar(3) NOT NULL ,
 `START_CODE` varchar(12) NOT NULL ,
 `START_DATE` datetime,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CCY_CODE`,`START_CODE`),
 KEY `IX_CCYRTBH` (`CCY_CODE`,`START_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CCYRTBM` (
 `CCY_CODE` varchar(3) NOT NULL ,
 `CCY_NAME01` varchar(50) DEFAULT NULL,
 `CCY_NAME02` varchar(50) DEFAULT NULL,
 `CCY_SYMBOL` varchar(10) DEFAULT NULL,
 `CCY_CTRY_CODE` varchar(12) DEFAULT NULL,
 `CCY_ABBRE` varchar(12) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CCY_CODE`),
 KEY `IX_CCYRTBM` (`CCY_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CENTERM` (
 `CTR_CODE` varchar(12) NOT NULL ,
 `CTR_ADR01` varchar(50) DEFAULT NULL,
 `CTR_ADR02` varchar(50) DEFAULT NULL,
 `CTR_ADR03` varchar(50) DEFAULT NULL,
 `CTR_ADR04` varchar(50) DEFAULT NULL,
 `CTR_CONT` varchar(50) DEFAULT NULL,
 `CTR_FAX` varchar(50) DEFAULT NULL,
 `CTR_NAME01` varchar(50) DEFAULT NULL,
 `CTR_NAME02` varchar(50) DEFAULT NULL,
 `CTR_NAME03` varchar(50) DEFAULT NULL,
 `CTR_NAME04` varchar(50) DEFAULT NULL,
 `CTR_TEL` varchar(50) DEFAULT NULL,
 `CTR_TYPE` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CTR_CODE`),
 KEY `IX_CENTERM` (`CTR_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CLASSTM` (
 `CLASS_CODE` varchar(22) NOT NULL ,
 `CLASS_NAME01` varchar(40) DEFAULT NULL,
 `CLASS_NAME02` varchar(40) DEFAULT NULL,
 `CLASS_NAME03` varchar(40) DEFAULT NULL,
 `CLASS_NAME04` varchar(40) DEFAULT NULL,
 `COLOR_CODE` varchar(40) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CLASS_CODE`),
 KEY `IX_CLASSTM` (`CLASS_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CLAXWHM` (
 `CLASS_CODE` varchar(12) NOT NULL ,
 `WH_CODE` varchar(12) NOT NULL ,
 `ACC_CODE01` varchar(50) DEFAULT NULL,
 `ACC_CODE02` varchar(50) DEFAULT NULL,
 `ACC_CODE03` varchar(50) DEFAULT NULL,
 `ACC_CODE04` varchar(50) DEFAULT NULL,
 `ACC_CODE05` varchar(50) DEFAULT NULL,
 `ACC_CODE06` varchar(50) DEFAULT NULL,
 `ACC_CODE07` varchar(50) DEFAULT NULL,
 `ACC_CODE08` varchar(50) DEFAULT NULL,
 `ACC_CODE09` varchar(50) DEFAULT NULL,
 `ACC_CODE10` varchar(50) DEFAULT NULL,
 `ACC_CODE11` varchar(50) DEFAULT NULL,
 `ACC_CODE12` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CLASS_CODE`,`WH_CODE`),
 KEY `IX_CLAXWHM` (`CLASS_CODE`,`WH_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `COLORTM` (
 `COLOR_CODE` varchar(50) NOT NULL ,
 `COLOR_NAME01` varchar(50) DEFAULT NULL,
 `COLOR_NAME02` varchar(50) DEFAULT NULL,
 `COLOR_NAME03` varchar(50) DEFAULT NULL,
 `COLOR_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COLOR_CODE`),
 KEY `IX_COLORTM` (`COLOR_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CORPTBM` (
 `CORP_CODE` varchar(50) NOT NULL ,
 `CORP_ADDR01` varchar(50) DEFAULT NULL,
 `CORP_ADDR02` varchar(50) DEFAULT NULL,
 `CORP_ADDR03` varchar(50) DEFAULT NULL,
 `CORP_ADDR04` varchar(50) DEFAULT NULL,
 `CORP_ADDR05` varchar(50) DEFAULT NULL,
 `CORP_ADDR06` varchar(50) DEFAULT NULL,
 `CORP_ADDR07` varchar(50) DEFAULT NULL,
 `CORP_ADDR08` varchar(50) DEFAULT NULL,
 `CORP_NAME01` varchar(50) DEFAULT NULL,
 `CORP_NAME02` varchar(50) DEFAULT NULL,
 `CORP_NAME03` varchar(50) DEFAULT NULL,
 `CORP_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CORP_CODE`),
 KEY `IX_CORPTBM` (`CORP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CQTDTLM` (
 `CQT_DT` varchar(50) NOT NULL ,
 `CQT_NO` varchar(15) DEFAULT NULL,
 `CQT_DT_RMKS` longtext DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `CQT_REQ_DATE` datetime,
 `CQT_REQ_QTY` decimal(18,8) DEFAULT (0),
 `CQT_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(22) DEFAULT NULL,
 `UPDATE_CUS_ITEM` bit DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `CQT_ITEM_NAME01` varchar(50) DEFAULT NULL,
 `CQT_ITEM_NAME02` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`CQT_DT`),
 KEY `IX_CQTDTLM` (`CQT_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CQTHDTM` (
 `CQT_NO` varchar(15) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CQT_RMKS` longtext DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `EXPIRY_DATE` datetime,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `CQT_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `PAY_CODE` varchar(50) DEFAULT NULL,
 `PTERM_CODE` varchar(50) DEFAULT NULL,
 `CQT_REQ_DATE` datetime,
 `SALES_CODE` varchar(50) DEFAULT NULL,
 `SVIA_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CQT_NO`),
 KEY `IX_CQTHDTM` (`CQT_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CTRYTBM` (
 `CTRY_CODE` varchar(50) NOT NULL ,
 `CTRY_NAME01` varchar(50) DEFAULT NULL,
 `CTRY_NAME02` varchar(50) DEFAULT NULL,
 `CTRY_NAME03` varchar(50) DEFAULT NULL,
 `CTRY_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CTRY_CODE`),
 KEY `IX_CTRYTBM` (`CTRY_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `CUSITEM` (
 `CUS_CODE` varchar(50) NOT NULL ,
 `CUS_ITEM` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(22) NOT NULL ,
 `BAR_CODE` varchar(50) DEFAULT NULL,
 `CRTN_AMT` decimal(18,8) DEFAULT (0),
 `CRTN_DATE` datetime,
 `CRTN_QTY` decimal(18,8) DEFAULT (0),
 `CRTN_RATE` decimal(18,8) DEFAULT (0),
 `DISC_RATE` decimal(18,8) DEFAULT (0),
 `EAN_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NAME1` varchar(50) DEFAULT NULL,
 `ITEM_NAME2` varchar(50) DEFAULT NULL,
 `ITEM_NAME3` varchar(50) DEFAULT NULL,
 `ITEM_NAME4` varchar(50) DEFAULT NULL,
 `L_CQ_CCY_CODE` varchar(50) DEFAULT NULL,
 `L_CQ_NO` varchar(50) DEFAULT NULL,
 `L_CQ_REQ_DATE` datetime,
 `L_CQ_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `L_CQ_UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `L_CQ_UOM_CODE` varchar(50) DEFAULT NULL,
 `L_CQ_XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `L_SO_CCY_CODE` varchar(50) DEFAULT NULL,
 `L_SO_NO` varchar(50) DEFAULT NULL,
 `L_SO_REC_DATE` datetime,
 `L_SO_REC_QTY` decimal(18,8) DEFAULT NULL,
 `L_SO_REC_WH` varchar(50) DEFAULT NULL,
 `L_SO_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `L_SO_RTV_DATE` datetime,
 `L_SO_RTV_QTY` varchar(10) DEFAULT NULL,
 `L_SO_UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `L_SO_UOM_CODE` varchar(50) DEFAULT NULL,
 `L_SO_XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `MADJ_RATE` decimal(18,8) DEFAULT (0),
 `REGN_CODE` varchar(50) DEFAULT NULL,
 `RTAL_PRICE` decimal(18,8) DEFAULT (0),
 `SALE_BPRICE` decimal(15,8) DEFAULT (0),
 `SALE_CCY` varchar(50) DEFAULT NULL,
 `SALE_UPRICE` decimal(15,8) DEFAULT (0),
 `STD_CCY` varchar(50) DEFAULT NULL,
 `STD_UPRICE` decimal(15,8) DEFAULT (0),
 `T_CO_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `T_SO_REQ_AMT` decimal(18,8) DEFAULT NULL,
 `T_SO_RTV_QTY` decimal(18,8) DEFAULT NULL,
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UPC_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CUS_CODE`,`CUS_ITEM`,`ITEM_NO`),
 KEY `IX_CUSITEM` (`CUS_CODE`,`CUS_ITEM`,`ITEM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DELYTBM` (
 `DELY_CODE` varchar(50) NOT NULL ,
 `CTRY_CODE` varchar(50) DEFAULT NULL,
 `DELY_ADR01` varchar(50) DEFAULT NULL,
 `DELY_ADR02` varchar(50) DEFAULT NULL,
 `DELY_ADR03` varchar(50) DEFAULT NULL,
 `DELY_ADR04` varchar(50) DEFAULT NULL,
 `DELY_CBL` varchar(50) DEFAULT NULL,
 `DELY_CONT` varchar(50) DEFAULT NULL,
 `DELY_FAX` varchar(50) DEFAULT NULL,
 `DELY_NAME01` varchar(50) DEFAULT NULL,
 `DELY_NAME02` varchar(50) DEFAULT NULL,
 `DELY_NAME03` varchar(50) DEFAULT NULL,
 `DELY_NAME04` varchar(50) DEFAULT NULL,
 `DELY_PORT` varchar(50) DEFAULT NULL,
 `DELY_TEL` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DELY_CODE`),
 KEY `IX_DELYTBM` (`DELY_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DIMTBLM` (
 `ITEM_NO` varchar(50) NOT NULL ,
 `CTN_NW` decimal(18,8) DEFAULT NULL,
 `CTN_GW` decimal(18,8) DEFAULT NULL,
 `INN_NW` decimal(18,8) DEFAULT NULL,
 `INN_GW` decimal(18,8) DEFAULT NULL,
 `INN_L` decimal(18,8) DEFAULT NULL,
 `INN_W` decimal(18,8) DEFAULT NULL,
 `INN_H` decimal(18,8) DEFAULT NULL,
 `CTN_QTY` decimal(18,8) DEFAULT NULL,
 `INN_QTY` decimal(18,8) DEFAULT NULL,
 `CTN_L` decimal(18,8) DEFAULT NULL,
 `CTN_W` decimal(18,8) DEFAULT NULL,
 `CTN_H` decimal(18,8) DEFAULT NULL,
 `CTN_CBM` decimal(18,8) DEFAULT NULL,
 `CTN_CFT` decimal(18,8) DEFAULT NULL,
 `INN_CBM` decimal(18,8) DEFAULT NULL,
 `INN_CFT` decimal(18,8) DEFAULT NULL,
 `UOW_CODE` varchar(50) DEFAULT NULL,
 `UOD_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`),
 KEY `IX_DIMTBLM` (`ITEM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DNRDTLM` (
 `DN_DT` varchar(18) NOT NULL ,
 `TRANS_CCY_CODE` varchar(3) DEFAULT NULL,
 `DN_NO` varchar(50) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `TRANS_REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_DO_NO` varchar(50) DEFAULT NULL,
 `TRANS_DO_DT` varchar(50) DEFAULT NULL,
 `TRANS_SO_DT` varchar(50) DEFAULT NULL,
 `TRANS_SO_NO` varchar(50) DEFAULT NULL,
 `TRANS_DXC` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `TRANS_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `TRANS_XCHG_RATE` decimal(18,8) DEFAULT (0),
 `SERIAL_NO` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DN_DT`),
 KEY `IX_DNRDTLM` (`DN_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DNRHDTM` (
 `DN_NO` varchar(50) NOT NULL ,
 `TRANS_CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `DN_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `TRANS_REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `TRANS_XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DN_NO`),
 KEY `IX_DNRHDTM` (`DN_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DORDTLM` (
 `DO_DT` varchar(20) NOT NULL ,
 `SERIAL_NO` int,
 `DN_REQ_QTY` decimal(20,8) DEFAULT (0),
 `DO_NO` varchar(20) DEFAULT NULL,
 `DO_DT_RMKS` longtext DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `DO_REQ_DATE` datetime,
 `DO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `SO_NO` varchar(20) DEFAULT NULL,
 `SO_DT` varchar(18) DEFAULT NULL,
 `IV_REQ_QTY` decimal(20,8) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DO_DT`),
 KEY `IX_DORDTLM` (`DO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `DORHDTM` (
 `DO_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `BPN_CODE` varchar(20) DEFAULT NULL,
 `ODTP_CODE` varchar(20) DEFAULT NULL,
 `ODTP_STATUS` varchar(20) DEFAULT NULL,
 `ODTP_XREV` int,
 `DO_ODTP_RMKS` longtext DEFAULT NULL,
 `SVIA_CODE` varchar(20) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DO_NO`),
 KEY `IX_DORHDTM` (`DO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `EBOMTBM` (
 `ASSM_NO` varchar(22) NOT NULL ,
 `ITEM_NO` varchar(22) NOT NULL ,
 `BOM_LOCX` longtext DEFAULT NULL,
 `BOM_RMKS` longtext DEFAULT NULL,
 `BOM_REFX` varchar(50) DEFAULT NULL,
 `ENG_QPE` decimal(18,8) DEFAULT (0),
 `ECN_NO` varchar(22) DEFAULT NULL,
 `QTY_PER` decimal(18,8) DEFAULT (0),
 `WASTAGE_RATE` decimal(18,8) DEFAULT (0),
 `SCRAP_RATE` decimal(18,8) DEFAULT (0),
 `UOM_ENG` varchar(8) DEFAULT NULL,
 `UOM_EXG` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ASSM_NO`,`ITEM_NO`),
 KEY `IX_EBOMTBM` (`ASSM_NO`,`ITEM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ECNDTLM` (
 `ECN_DT` varchar(20) NOT NULL ,
 `ALT_ITEM` varchar(22) DEFAULT NULL,
 `ASSM_NO` varchar(22) DEFAULT NULL,
 `ECN_ATVT_CODE` varchar(50) DEFAULT NULL,
 `ECN_LOCX` varchar(50) DEFAULT NULL,
 `ECN_NO` varchar(50) DEFAULT NULL,
 `ECN_REFX` varchar(50) DEFAULT NULL,
 `ECN_RMKS` longtext DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `QTY_PER` decimal(18,8) DEFAULT (0),
 `UOM_ENG` varchar(50) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `ENG_QPE` decimal(18,0) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `WASTAGE_RATE` decimal(20,8) DEFAULT NULL,
 `SCRAP_RATE` decimal(20,8) DEFAULT NULL,
 PRIMARY KEY (`ECN_DT`),
 KEY `IX_ECNDTLM` (`ECN_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ECNHDTM` (
 `ECN_NO` varchar(20) NOT NULL ,
 `ECN_DATE` datetime,
 `ECN_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_CODE` varchar(12) DEFAULT NULL,
 `ODTP_STATUS` varchar(12) DEFAULT NULL,
 `COMP_CODE` varchar(12) DEFAULT NULL,
 `ODTP_XREV` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ECN_NO`),
 KEY `IX_ECNHDTM` (`ECN_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `FGNDTLM` (
 `FG_DT` varchar(50) NOT NULL ,
 `BOOK_AMT` decimal(18,8) DEFAULT (0),
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DISC_RATE` decimal(18,8) DEFAULT (0),
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FG_NO` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_ADJ` decimal(18,8) DEFAULT (0),
 `TRANS_AMT` decimal(18,8) DEFAULT (0),
 `TRANS_BAM` decimal(18,8) DEFAULT (0),
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_DDC` varchar(50) DEFAULT NULL,
 `TRANS_WO_NO` varchar(50) DEFAULT NULL,
 `TRANS_DXC` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_TDC` varchar(50) DEFAULT NULL,
 `TRANS_TOC` varchar(50) DEFAULT NULL,
 `TRANS_TXC` varchar(50) DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFN1` varchar(50) DEFAULT NULL,
 `TRANS_UDFN2` varchar(50) DEFAULT NULL,
 `TRANS_UDFN3` varchar(50) DEFAULT NULL,
 `TRANS_UDFN4` varchar(50) DEFAULT NULL,
 `TRANS_UDFN5` varchar(50) DEFAULT NULL,
 `TRANS_UDFN6` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `WH_REFX` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`FG_DT`),
 KEY `IX_FGNDTLM` (`FG_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `FGNHDTM` (
 `FG_NO` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `FGN_ODTP_RMKS` longtext DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `WH_REFX` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`FG_NO`),
 KEY `IX_FGNHDTM` (`FG_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `FORWTBM` (
 `FORW_CODE` varchar(50) NOT NULL ,
 `FORW_ADR01` varchar(50) DEFAULT NULL,
 `FORW_ADR02` varchar(50) DEFAULT NULL,
 `FORW_ADR03` varchar(50) DEFAULT NULL,
 `FORW_ADR04` varchar(50) DEFAULT NULL,
 `FORW_CBL` varchar(50) DEFAULT NULL,
 `FORW_CONT` varchar(50) DEFAULT NULL,
 `FORW_FAX` varchar(50) DEFAULT NULL,
 `FORW_NAME01` varchar(50) DEFAULT NULL,
 `FORW_NAME02` varchar(50) DEFAULT NULL,
 `FORW_NAME03` varchar(50) DEFAULT NULL,
 `FORW_NAME04` varchar(50) DEFAULT NULL,
 `FORW_TEL` varchar(50) DEFAULT NULL,
 `REGN_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`FORW_CODE`),
 KEY `IX_FORWTBM` (`FORW_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `GRNDTLM` (
 `REC_DT` varchar(50) NOT NULL ,
 `BOOK_AMT` decimal(18,8) DEFAULT (0),
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DISC_RATE` decimal(18,8) DEFAULT (0),
 `DOC_NO` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REC_NO` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_ADJ` decimal(18,8) DEFAULT (0),
 `TRANS_AMT` decimal(18,8) DEFAULT (0),
 `TRANS_BAM` decimal(18,8) DEFAULT (0),
 `TRANS_PO_DT` varchar(50) DEFAULT NULL,
 `TRANS_PO_NO` varchar(50) DEFAULT NULL,
 `TRANS_DXC` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_TDC` varchar(50) DEFAULT NULL,
 `TRANS_TOC` varchar(50) DEFAULT NULL,
 `TRANS_TXC` varchar(50) DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFN1` varchar(50) DEFAULT NULL,
 `TRANS_UDFN2` varchar(50) DEFAULT NULL,
 `TRANS_UDFN3` varchar(50) DEFAULT NULL,
 `TRANS_UDFN4` varchar(50) DEFAULT NULL,
 `TRANS_UDFN5` varchar(50) DEFAULT NULL,
 `TRANS_UDFN6` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REC_DT`),
 KEY `IX_GRNDTLM` (`REC_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `GRNHDTM` (
 `REC_NO` varchar(50) NOT NULL ,
 `TRANS_CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `GRN_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `TRANS_XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REC_NO`),
 KEY `IX_GRNHDTM` (`REC_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `HANDTBM` (
 `HAND_CODE` varchar(12) NOT NULL ,
 `DIRECT_LINE` varchar(50) DEFAULT NULL,
 `HAND_NAME01` varchar(50) DEFAULT NULL,
 `HAND_NAME02` varchar(50) DEFAULT NULL,
 `HAND_NAME03` varchar(50) DEFAULT NULL,
 `HAND_NAME04` varchar(50) DEFAULT NULL,
 `MAIL_ADDR` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`HAND_CODE`),
 KEY `IX_HANDTBM` (`HAND_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ITEMATM` (
 `ITEM_NO` varchar(50) NOT NULL ,
 `ATTR_CODE` varchar(50) NOT NULL ,
 `ATTR_VALUE` varchar(100) DEFAULT NULL,
 `ATTR_RMKS` longtext DEFAULT NULL,
 `XDIR_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`ATTR_CODE`),
 KEY `IX_ITEMATM` (`ITEM_NO`,`ATTR_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ITEMTPM` (
 `ITEMTP_CODE` varchar(50) NOT NULL ,
 `ITEMTP_NAME01` varchar(50) DEFAULT NULL,
 `ITEMTP_NAME02` varchar(50) DEFAULT NULL,
 `ITEMTP_NAME03` varchar(50) DEFAULT NULL,
 `ITEMTP_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEMTP_CODE`),
 KEY `IX_ITEMTPM` (`ITEMTP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `IVRDTLM` (
 `IV_DT` varchar(50) NOT NULL ,
 `ANAY_CODE01` varchar(50) DEFAULT NULL,
 `ANAY_CODE02` varchar(50) DEFAULT NULL,
 `ANAY_CODE03` varchar(50) DEFAULT NULL,
 `ANAY_CODE04` varchar(50) DEFAULT NULL,
 `ANAY_CODE05` varchar(50) DEFAULT NULL,
 `ANAY_CODE06` varchar(50) DEFAULT NULL,
 `ANAY_CODE07` varchar(50) DEFAULT NULL,
 `ANAY_CODE08` varchar(50) DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `DO_DT` varchar(50) DEFAULT NULL,
 `DO_NO` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `IV_NO` varchar(50) DEFAULT NULL,
 `REGN_CODE` varchar(50) DEFAULT NULL,
 `IV_REQ_DATE` datetime,
 `IV_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `IV_REQ_QTY` decimal(18,8) DEFAULT (0),
 `SO_DT` varchar(50) DEFAULT NULL,
 `SO_NO` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `IV_DT_RMKS` longtext DEFAULT NULL,
 `IV_DELY_DATE` datetime,
 PRIMARY KEY (`IV_DT`),
 KEY `IX_IVRDTLM` (`IV_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `IVRHDTM` (
 `IV_NO` varchar(15) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `BPN_CODE` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `IV_ODTP_RMKS` longtext DEFAULT NULL,
 `CUS_TERM` varchar(50) DEFAULT NULL,
 `BILL_CODE` varchar(50) DEFAULT NULL,
 `SVIA_CODE` varchar(50) DEFAULT NULL,
 `PTERM_CODE` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `PORT_FM` varchar(50) DEFAULT NULL,
 `PORT_TO` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `IV_ETA_DATE` datetime,
 `IV_ETD_DATE` datetime,
 `IV_DUE_DATE` datetime,
 `IV_TRANS_DATE` datetime,
 `IV_REQ_DATE` datetime,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`IV_NO`),
 KEY `IX_IVRHDTM` (`IV_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `LCBANKM` (
 `LCBK_CODE` varchar(50) NOT NULL ,
 `LCBK_NAME01` varchar(50) DEFAULT NULL,
 `LCBK_NAME02` varchar(50) DEFAULT NULL,
 `LCBK_NAME03` varchar(50) DEFAULT NULL,
 `LCBK_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LCBK_CODE`),
 KEY `IX_LCBANKM` (`LCBK_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `LCRDTLM` (
 `LC_DT` varchar(50) NOT NULL ,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(50) DEFAULT NULL,
 `LC_NO` varchar(50) DEFAULT NULL,
 `LC_RMKS` longtext DEFAULT NULL,
 `REQ_DATE` datetime,
 `REQ_QTY` decimal(18,8) DEFAULT (0),
 `XREF_DDC01` varchar(20) DEFAULT NULL,
 `XREF_DDC02` varchar(20) DEFAULT NULL,
 `XREF_DDC03` varchar(20) DEFAULT NULL,
 `XREF_DDC04` varchar(20) DEFAULT NULL,
 `XREF_DDC05` varchar(20) DEFAULT NULL,
 `XREF_DDC06` varchar(20) DEFAULT NULL,
 `XREF_DDC07` varchar(20) DEFAULT NULL,
 `XREF_DDC08` varchar(20) DEFAULT NULL,
 `XREF_DOC01` varchar(20) DEFAULT NULL,
 `XREF_DOC02` varchar(20) DEFAULT NULL,
 `XREF_DOC03` varchar(20) DEFAULT NULL,
 `XREF_DOC04` varchar(20) DEFAULT NULL,
 `XREF_DOC05` varchar(20) DEFAULT NULL,
 `XREF_DOC06` varchar(20) DEFAULT NULL,
 `XREF_DOC07` varchar(20) DEFAULT NULL,
 `XREF_DOC08` varchar(20) DEFAULT NULL,
 `XWO_QTY` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LC_DT`),
 KEY `IX_LCRDTLM` (`LC_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `LCRHDTM` (
 `LC_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `CUS_ORD` varchar(50) DEFAULT NULL,
 `EXPIRE_DATE` datetime,
 `ISSUE_DATE` datetime,
 `BLANK_CODE` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LC_NO`),
 KEY `IX_LCRHDTM` (`LC_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `LOCATBM` (
 `LOC_CODE` varchar(20) NOT NULL ,
 `LOC_NAME01` varchar(50) DEFAULT NULL,
 `LOC_NAME02` varchar(50) DEFAULT NULL,
 `LOC_NAME03` varchar(50) DEFAULT NULL,
 `LOC_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LOC_CODE`),
 KEY `IX_LOCATBM` (`LOC_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `LOTMTBM` (
 `TRANS_UDFX6` varchar(20) NOT NULL ,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `LOT_DDC` varchar(18) DEFAULT NULL,
 `LOT_DOC` varchar(18) DEFAULT NULL,
 `LOT_RMKS` longtext DEFAULT NULL,
 `LOT_DATE01` datetime,
 `LOT_DATE02` datetime,
 `LOT_DATE03` datetime,
 `LOT_DATE04` datetime,
 `LOT_DATE05` datetime,
 `ODTP_CODE` varchar(12) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `BOOK_PRICE` decimal(18,8) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `CCY_CODE` varchar(12) DEFAULT NULL,
 `CLOSE_BIT` bit DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TRANS_UDFX6`),
 KEY `IX_LOTMTBM` (`TRANS_UDFX6`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MBOXTBM` (
 `MBOX_ID` varchar(18) NOT NULL ,
 `MBOX_SENDER` varchar(255) DEFAULT NULL,
 `MBOX_TITLE` varchar(255) DEFAULT NULL,
 `MBOX_INCEPT_CC` longtext DEFAULT NULL,
 `MBOX_INCEPT_BCC` longtext DEFAULT NULL,
 `MBOX_INCEPT` longtext DEFAULT NULL,
 `MBOX_CONTENT` longtext DEFAULT NULL,
 `MBOX_XDIR` varchar(18) DEFAULT NULL,
 `READ_BIT` bit DEFAULT NULL,
 `SENT_BIT` bit DEFAULT NULL,
 `TRY_TIMES` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MBOX_ID`),
 KEY `IX_MBOXTBM` (`MBOX_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MIRDTLM` (
 `MI_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `MI_NO` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `TRANS_WO_DT` varchar(50) DEFAULT NULL,
 `TRANS_WO_NO` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MI_DT`),
 KEY `IX_MIRDTLM` (`MI_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MIRHDTM` (
 `MI_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `MI_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MI_NO`),
 KEY `IX_MIRHDTM` (`MI_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MMIDTLM` (
 `MMI_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `MMI_NO` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MMI_DT`),
 KEY `IX_MMIDTLM` (`MMI_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MMIHDTM` (
 `MMI_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `MMI_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MMI_NO`),
 KEY `IX_MMIHDTM` (`MMI_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MMRDTLM` (
 `MM_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `MM_NO` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MM_DT`),
 KEY `IX_MMRDTLM` (`MM_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MMRHDTM` (
 `MM_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `MM_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `VEN_CODE` varchar(12) DEFAULT NULL,
 PRIMARY KEY (`MM_NO`),
 KEY `IX_MMRHDTM` (`MM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MODDTLM` (
 `MOLD_DT` varchar(50) NOT NULL ,
 `MOLD_AUXI` varchar(5) DEFAULT NULL,
 `MOLD_CAVITY` int,
 `MOLD_CODE` varchar(50) DEFAULT NULL,
 `MOLD_MARK01` varchar(50) DEFAULT NULL,
 `MOLD_MARK02` varchar(50) DEFAULT NULL,
 `MOLD_MARK03` varchar(50) DEFAULT NULL,
 `MOLD_MARK04` varchar(50) DEFAULT NULL,
 `MOLD_NO` varchar(50) DEFAULT NULL,
 `MOLD_NW` int,
 `MOLD_SERI` int,
 `MOLD_XREV` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MOLD_DT`),
 KEY `IX_MODDTLM` (`MOLD_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MODHDTM` (
 `MOLD_CODE` varchar(50) NOT NULL ,
 `CAT_CODE` varchar(50) DEFAULT NULL,
 `CAV_QTY` int,
 `CUS_CODE` varchar(50) DEFAULT NULL,
 `CUS_MOLD` varchar(50) DEFAULT NULL,
 `INHS_DATE` datetime,
 `MAKE_DATE` datetime,
 `MOLD_CLASS` varchar(50) DEFAULT NULL,
 `MOLD_GW` int,
 `MOLD_NAME01` varchar(50) DEFAULT NULL,
 `MOLD_NAME02` varchar(50) DEFAULT NULL,
 `MOLD_NAME03` varchar(50) DEFAULT NULL,
 `MOLD_NAME04` varchar(50) DEFAULT NULL,
 `NOOF_AVAIL` int,
 `NOOF_SHOT` int,
 `PROJ_NO` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MOLD_CODE`),
 KEY `IX_MODHDTM` (`MOLD_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MORDTLM` (
 `MO_DT` varchar(18) NOT NULL ,
 `SERIAL_NO` int,
 `CTR_CODE` varchar(12) DEFAULT NULL,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `MO_NO` varchar(18) DEFAULT NULL,
 `MO_DT_RMKS` longtext DEFAULT NULL,
 `MO_REQ_DATE` datetime,
 `MO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `MO_START_DATE` datetime,
 `MO_WO_QTY` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MO_DT`),
 KEY `IX_MORDTLM` (`MO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MORHDTM` (
 `MO_NO` varchar(18) NOT NULL ,
 `COMP_CODE` varchar(12) DEFAULT NULL,
 `CTR_CODE` varchar(12) DEFAULT NULL,
 `ODTP_CODE` varchar(12) DEFAULT NULL,
 `MO_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(12) DEFAULT NULL,
 `ODTP_XREV` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MO_NO`),
 KEY `IX_MORHDTM` (`MO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MRVDTLM` (
 `MR_DT` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `MR_NO` varchar(50) DEFAULT NULL,
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `MR_REQ_DATE` datetime,
 `MR_REQ_QTY` decimal(18,8) DEFAULT (0),
 `MR_DT_RMKS` longtext DEFAULT NULL,
 `WO_NO` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `MR_MI_QTY` decimal(18,8) DEFAULT (0),
 `MR_MI_AMT` decimal(18,8) DEFAULT (0),
 PRIMARY KEY (`MR_DT`),
 KEY `IX_MRVDTLM` (`MR_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `MRVHDTM` (
 `MR_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `MR_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `MR_ODTP_DATE` datetime,
 `REQ_QTY` decimal(18,8) DEFAULT (0),
 `WO_NO` varchar(50) DEFAULT NULL,
 `XFG_QTY` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`MR_NO`),
 KEY `IX_MRVHDTM` (`MR_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PARTBLM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `ITEM_ABBR_NAME` varchar(12) DEFAULT NULL,
 `ABC_CLASS_CODE` varchar(8) DEFAULT NULL,
 `ITEM_ALIAS_NAME` varchar(50) DEFAULT NULL,
 `ITEM_AUX_CODE` varchar(50) DEFAULT NULL,
 `CAT_CODE` varchar(12) DEFAULT NULL,
 `CLASS_CODE` varchar(22) DEFAULT NULL,
 `ITEM_DRWG_NO` varchar(50) DEFAULT NULL,
 `EXPIRY_DAY` int,
 `HAND_CODE` varchar(20) DEFAULT NULL,
 `ITEM_NAME01` varchar(50) DEFAULT NULL,
 `ITEM_NAME02` varchar(50) DEFAULT NULL,
 `ITEM_NAME03` varchar(50) DEFAULT NULL,
 `ITEM_NAME04` varchar(50) DEFAULT NULL,
 `ITEM_NAME05` varchar(50) DEFAULT NULL,
 `ITEM_TP_CODE` varchar(8) DEFAULT NULL,
 `LEAD_TM` int,
 `MBC_CODE` varchar(8) DEFAULT NULL,
 `MIN_ORD` decimal(18,8) DEFAULT (0),
 `MIN_STK` decimal(18,8) DEFAULT (0),
 `PKG_ORD` decimal(18,8) DEFAULT (0),
 `PROJ_NO` varchar(22) DEFAULT NULL,
 `STATUS_CODE` varchar(10) DEFAULT NULL,
 `UOM_CODE` varchar(10) DEFAULT NULL,
 `UOM_CODE2` varchar(8) DEFAULT NULL,
 `UOM_ENG` varchar(8) DEFAULT NULL,
 `ITEM_RMKS` longtext DEFAULT NULL,
 `PHANTOM_BIT` bit DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`),
 KEY `IX_PARTBLM` (`ITEM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PMTCDTM` (
 `PMT_CODE` varchar(50) NOT NULL ,
 `PMT_NAME01` varchar(50) DEFAULT NULL,
 `PMT_NAME02` varchar(50) DEFAULT NULL,
 `PMT_NAME03` varchar(50) DEFAULT NULL,
 `PMT_AMS_BIT` bit NOT NULL  DEFAULT (0),
 `PMT_CR_DAY` decimal(18,0) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PMT_CODE`),
 KEY `IX_PMTCDTM` (`PMT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNACDTM` (
 `PN_NET_CODE` varchar(36) NOT NULL ,
 `PN_A_CODE` varchar(36) NOT NULL ,
 `PN_A_NAME01` varchar(50) DEFAULT NULL,
 `PN_T_CODE` varchar(36) DEFAULT NULL,
 `PN_P_CODE` varchar(36) DEFAULT NULL,
 `PN_A_CLASS` varchar(32) DEFAULT NULL,
 `PN_A_IF_DATA` longtext DEFAULT NULL,
 `PN_A_DIR` varchar(12) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PN_NET_CODE`,`PN_A_CODE`),
 KEY `IX_PNACDTM` (`PN_NET_CODE`,`PN_A_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNCZTBM` (
 `PN_WCZ_CODE` varchar(36) NOT NULL ,
 `PN_NET_CODE` varchar(36) DEFAULT NULL,
 `PN_WCZ_CONTEXT` longtext DEFAULT NULL,
 `PN_WCZ_STATUS` varchar(12) DEFAULT NULL,
 `PN_START_DATE` datetime,
 `PN_FINAL_DATE` datetime,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `PN_NET_CONTEXT` longtext DEFAULT NULL,
 `PN_DATA_CODE` varchar(36) DEFAULT NULL,
 PRIMARY KEY (`PN_WCZ_CODE`),
 KEY `IX_PNCZTBM` (`PN_WCZ_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNMSGTM` (
 `UID_CODE` varchar(36) NOT NULL ,
 `ACCESS_RT_CODE` varchar(36) NOT NULL ,
 `PN_TP_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UID_CODE`,`ACCESS_RT_CODE`),
 KEY `IX_PNMSGTM` (`UID_CODE`,`ACCESS_RT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNNCDTM` (
 `PN_NET_CODE` varchar(36) NOT NULL ,
 `PN_NET_NAME01` varchar(50) DEFAULT NULL,
 `PN_NET_RMKS` longtext DEFAULT NULL,
 `PN_NET_MSG` longtext DEFAULT NULL,
 `PN_NET_START_DATE` datetime,
 `PN_NET_FINAL_DATE` datetime,
 `PN_NET_ATVT_CODE` varchar(12) DEFAULT NULL,
 `PN_NET_ATV_YN` bit DEFAULT NULL,
 `PN_NET_CONTEXT` longtext DEFAULT NULL,
 `PN_TP_CODE` varchar(36) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PN_NET_CODE`),
 KEY `IX_PNNCDTM` (`PN_NET_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNPCDTM` (
 `PN_NET_CODE` varchar(36) NOT NULL ,
 `PN_P_CODE` varchar(36) NOT NULL ,
 `PN_P_CLASS` varchar(2) DEFAULT NULL,
 `PN_P_NAME01` varchar(50) DEFAULT NULL,
 `PN_P_RMKS` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PN_NET_CODE`,`PN_P_CODE`),
 KEY `IX_PNPCDTM` (`PN_NET_CODE`,`PN_P_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNSIGNM` (
 `PN_WCZ_CODE` varchar(36) NOT NULL ,
 `PN_SIGN_CODE` varchar(36) NOT NULL ,
 `PN_NET_CODE` varchar(36) DEFAULT NULL,
 `PN_P_CODE` varchar(36) DEFAULT NULL,
 `PN_SIGN_STATUS` varchar(12) DEFAULT NULL,
 `PN_CONTEXT` longtext DEFAULT NULL,
 `PN_ENTER_DATE` datetime,
 `PN_LEAVE_DATE` datetime,
 `PN_CANCELLED_DATE` datetime,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `PN_DATA_CODE` varchar(36) DEFAULT NULL,
 PRIMARY KEY (`PN_WCZ_CODE`,`PN_SIGN_CODE`),
 KEY `IX_PNSIGNM` (`PN_WCZ_CODE`,`PN_SIGN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNTCDTM` (
 `PN_NET_CODE` varchar(36) NOT NULL ,
 `PN_T_CODE` varchar(36) NOT NULL ,
 `PN_T_RMKS` longtext DEFAULT NULL,
 `PN_T_NAME01` varchar(50) DEFAULT NULL,
 `PN_T_TP_CODE` varchar(15) DEFAULT NULL,
 `PN_T_TRIG` varchar(15) DEFAULT NULL,
 `PN_T_EXPIRY` int,
 `PN_ATV_CODE` varchar(12) DEFAULT NULL,
 `APPV_CODE` varchar(12) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PN_NET_CODE`,`PN_T_CODE`),
 KEY `IX_PNTCDTM` (`PN_NET_CODE`,`PN_T_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNTPCDM` (
 `PN_TP_CODE` varchar(36) NOT NULL ,
 `PN_TP_RMKS` longtext DEFAULT NULL,
 `PN_TP_NAME01` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PN_TP_CODE`),
 KEY `IX_PNTPCDM` (`PN_TP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PNWKTBM` (
 `PN_WCZ_CODE` varchar(36) DEFAULT NULL,
 `PN_WKT_CODE` varchar(36) NOT NULL ,
 `PN_NET_CODE` varchar(36) DEFAULT NULL,
 `PN_T_CODE` varchar(36) DEFAULT NULL,
 `PN_WKT_CONTEXT` longtext DEFAULT NULL,
 `PN_ATVT_CODE` varchar(12) DEFAULT NULL,
 `PN_WKT_STATUS` varchar(12) DEFAULT NULL,
 `PN_ENABLED_DATE` datetime,
 `PN_FINISHED_DATE` datetime,
 `PN_CANCELLED_DATE` datetime,
 `PN_DEADLINE_DATE` datetime,
 `PN_USER_ID` varchar(50) DEFAULT NULL,
 `PN_APPV_CODE` varchar(12) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `PN_DATA_CODE` varchar(32) DEFAULT NULL,
 `PN_WKT_RMKS` longtext DEFAULT NULL,
 PRIMARY KEY (`PN_WKT_CODE`),
 KEY `IX_PNWKTBM` (`PN_WKT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORDIVM` (
 `PO_DIV` varchar(50) NOT NULL ,
 `PO_NO` varchar(50) DEFAULT NULL,
 `REQ_DATE` datetime,
 `REQ_QTY` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PO_DIV`),
 KEY `IX_PORDIVM` (`PO_DIV`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORDTLE` (
 `PO_DT` varchar(50) NOT NULL ,
 `PO_NO` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `PO_DT_RMKS` longtext DEFAULT NULL,
 `PU_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_BAL_QTY` decimal(18,8) DEFAULT NULL,
 `PO_REQ_DATE` datetime,
 `PO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_RTV_QTY` decimal(18,8) DEFAULT (0),
 `PO_REC_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `PU_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `PO_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UNIT_RATE` decimal(18,8) DEFAULT NULL,
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `PU_UOM_CODE` varchar(10) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `PO_ITEM_NAME01` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME02` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME03` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME04` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME05` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`PO_DT`),
 KEY `IX_PORDTLE` (`PO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORDTLH` (
 `XREV_NO` varchar(20) NOT NULL ,
 `XVER_CONTENT` longtext DEFAULT NULL,
 `PO_DT` varchar(50) NOT NULL ,
 `PO_NO` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `PO_DT_RMKS` longtext DEFAULT NULL,
 `PU_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_BAL_QTY` decimal(18,8) DEFAULT NULL,
 `PO_REQ_DATE` datetime,
 `PO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_RTV_QTY` decimal(18,8) DEFAULT (0),
 `PO_REC_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `PU_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `PO_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UNIT_RATE` decimal(18,8) DEFAULT NULL,
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `PU_UOM_CODE` varchar(10) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `PO_ITEM_NAME01` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME02` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME03` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME04` varchar(50) DEFAULT NULL,
 `PO_ITEM_NAME05` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`XREV_NO`,`PO_DT`),
 KEY `IX_PORDTLH` (`XREV_NO`,`PO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORDTLM` (
 `PO_DT` varchar(18) NOT NULL ,
 `PO_NO` varchar(18) DEFAULT NULL,
 `SERIAL_NO` int,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `PO_DT_RMKS` longtext DEFAULT NULL,
 `PU_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_BAL_QTY` decimal(18,8) DEFAULT NULL,
 `PO_REQ_DATE` datetime,
 `PO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `PO_RTV_QTY` decimal(18,8) DEFAULT (0),
 `PO_REC_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_UDFX1` varchar(12) DEFAULT NULL,
 `TRANS_UDFX2` varchar(12) DEFAULT NULL,
 `TRANS_UDFX3` varchar(12) DEFAULT NULL,
 `TRANS_UDFX4` varchar(12) DEFAULT NULL,
 `TRANS_UDFX5` varchar(12) DEFAULT NULL,
 `TRANS_UDFX6` varchar(12) DEFAULT NULL,
 `PU_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `PO_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UNIT_RATE` decimal(18,8) DEFAULT NULL,
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `PU_UOM_CODE` varchar(10) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `WH_CODE` varchar(12) DEFAULT NULL,
 `PO_ITEM_NAME01` varchar(40) DEFAULT NULL,
 `PO_ITEM_NAME02` varchar(40) DEFAULT NULL,
 `PO_ITEM_NAME03` varchar(40) DEFAULT NULL,
 `PO_ITEM_NAME04` varchar(40) DEFAULT NULL,
 `PO_ITEM_NAME05` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PO_DT`),
 KEY `IX_PORDTLM` (`PO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORHDTE` (
 `PO_NO` varchar(50) NOT NULL ,
 `APPV_WAIT` varchar(50) DEFAULT NULL,
 `BUGT_NO` varchar(50) DEFAULT NULL,
 `BUYER_CODE` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `DISC_FAT` decimal(19,8) DEFAULT (0),
 `ODTP_AMT` decimal(15,8) DEFAULT (0),
 `ODTP_APPV` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) NOT NULL ,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_SRC` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `PORT_CODE` varchar(50) DEFAULT NULL,
 `PTERM_CODE` varchar(50) DEFAULT NULL,
 `REQ_DATE` datetime,
 `SITE_CODE` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `VEN_TERM` varchar(50) DEFAULT NULL,
 `VEN_VIA` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `XREF_DDC01` varchar(20) DEFAULT NULL,
 `XREF_DDC02` varchar(20) DEFAULT NULL,
 `XREF_DDC03` varchar(20) DEFAULT NULL,
 `XREF_DDC04` varchar(20) DEFAULT NULL,
 `XREF_DDC05` varchar(20) DEFAULT NULL,
 `XREF_DDC06` varchar(20) DEFAULT NULL,
 `XREF_DDC07` varchar(20) DEFAULT NULL,
 `XREF_DDC08` varchar(20) DEFAULT NULL,
 `XREF_DOC01` varchar(20) DEFAULT NULL,
 `XREF_DOC02` varchar(20) DEFAULT NULL,
 `XREF_DOC03` varchar(20) DEFAULT NULL,
 `XREF_DOC04` varchar(20) DEFAULT NULL,
 `XREF_DOC05` varchar(20) DEFAULT NULL,
 `XREF_DOC06` varchar(20) DEFAULT NULL,
 `XREF_DOC07` varchar(20) DEFAULT NULL,
 `XREF_DOC08` varchar(20) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PO_NO`),
 KEY `IX_PORHDTE` (`PO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORHDTH` (
 `XREV_NO` varchar(20) NOT NULL ,
 `PO_NO` varchar(50) NOT NULL ,
 `APPV_WAIT` varchar(50) DEFAULT NULL,
 `BUGT_NO` varchar(50) DEFAULT NULL,
 `BUYER_CODE` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `DISC_FAT` decimal(19,8) DEFAULT (0),
 `ODTP_AMT` decimal(15,8) DEFAULT (0),
 `ODTP_APPV` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) NOT NULL ,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_SRC` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `PORT_CODE` varchar(50) DEFAULT NULL,
 `PTERM_CODE` varchar(50) DEFAULT NULL,
 `REQ_DATE` datetime,
 `SITE_CODE` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `VEN_TERM` varchar(50) DEFAULT NULL,
 `VEN_VIA` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `XREF_DDC01` varchar(20) DEFAULT NULL,
 `XREF_DDC02` varchar(20) DEFAULT NULL,
 `XREF_DDC03` varchar(20) DEFAULT NULL,
 `XREF_DDC04` varchar(20) DEFAULT NULL,
 `XREF_DDC05` varchar(20) DEFAULT NULL,
 `XREF_DDC06` varchar(20) DEFAULT NULL,
 `XREF_DDC07` varchar(20) DEFAULT NULL,
 `XREF_DDC08` varchar(20) DEFAULT NULL,
 `XREF_DOC01` varchar(20) DEFAULT NULL,
 `XREF_DOC02` varchar(20) DEFAULT NULL,
 `XREF_DOC03` varchar(20) DEFAULT NULL,
 `XREF_DOC04` varchar(20) DEFAULT NULL,
 `XREF_DOC05` varchar(20) DEFAULT NULL,
 `XREF_DOC06` varchar(20) DEFAULT NULL,
 `XREF_DOC07` varchar(20) DEFAULT NULL,
 `XREF_DOC08` varchar(20) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`XREV_NO`,`PO_NO`),
 KEY `IX_PORHDTH` (`XREV_NO`,`PO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORHDTM` (
 `PO_NO` varchar(15) NOT NULL ,
 `BUYER_CODE` varchar(12) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(15) DEFAULT NULL,
 `DELY_CODE` varchar(15) DEFAULT NULL,
 `DISC_FAT` decimal(19,8) DEFAULT (0),
 `ODTP_AMT` decimal(15,8) DEFAULT (0),
 `ODTP_CODE` varchar(15) DEFAULT NULL,
 `PO_ODTP_RMKS01` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(15) DEFAULT NULL,
 `ODTP_XREV` int,
 `PORT_CODE` varchar(15) DEFAULT NULL,
 `PTERM_CODE` varchar(15) DEFAULT NULL,
 `PO_REQ_DATE` datetime,
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `PO_PMT_CODE` varchar(15) DEFAULT NULL,
 `SVIA_CODE` varchar(15) DEFAULT NULL,
 `PO_VAT_TAX` decimal(20,8) DEFAULT NULL,
 `PO_PI_NO` varchar(15) DEFAULT NULL,
 `PO_FI_NO` varchar(15) DEFAULT NULL,
 `PO_ODTP_RMKS02` longtext DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PO_NO`),
 KEY `IX_PORHDTM` (`PO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PORTBLM` (
 `PORT_CODE` varchar(50) NOT NULL ,
 `CTRY_CODE` varchar(50) DEFAULT NULL,
 `FORW_CODE` varchar(50) DEFAULT NULL,
 `PORT_ADR01` varchar(50) DEFAULT NULL,
 `PORT_ADR02` varchar(50) DEFAULT NULL,
 `PORT_ADR03` varchar(50) DEFAULT NULL,
 `PORT_ADR04` varchar(50) DEFAULT NULL,
 `PORT_NAME01` varchar(50) DEFAULT NULL,
 `PORT_NAME02` varchar(50) DEFAULT NULL,
 `PORT_NAME03` varchar(50) DEFAULT NULL,
 `PORT_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PORT_CODE`),
 KEY `IX_PORTBLM` (`PORT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PPODTLM` (
 `PPO_DT` varchar(18) NOT NULL ,
 `ACCEPT_BIT` bit DEFAULT (0),
 `BUYER_CODE` varchar(15) DEFAULT NULL,
 `CCY_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(15) DEFAULT NULL,
 `COMP_CODE` varchar(15) DEFAULT NULL,
 `DELY_CODE` varchar(15) DEFAULT NULL,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `PPO_NO` varchar(15) NOT NULL ,
 `PPO_DT_RMKS` longtext DEFAULT NULL,
 `PU_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `LEAD_TM` decimal(18,0) DEFAULT NULL,
 `PKG_ORD` decimal(18,0) DEFAULT NULL,
 `PPO_REQ_DATE` datetime,
 `PPO_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `ORG_DATE` datetime,
 `ORG_QTY` decimal(18,0) DEFAULT NULL,
 `PPO_UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `PU_UOM_CODE` varchar(10) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `PU_UNIT_PRICE` decimal(20,8) DEFAULT NULL,
 `SERIAL_NO` int,
 `VEN_CODE` varchar(15) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PPO_DT`),
 KEY `IX_PPODTLM` (`PPO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PPOHDTM` (
 `PPO_NO` varchar(15) NOT NULL ,
 `ODTP_CODE` varchar(15) DEFAULT NULL,
 `PPO_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(15) DEFAULT NULL,
 `COMP_CODE` varchar(15) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PPO_NO`),
 KEY `IX_PPOHDTM` (`PPO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PROJTBM` (
 `PROJ_NO` varchar(22) NOT NULL ,
 `FINAL_DATE` datetime,
 `PROJ_NAME01` varchar(50) DEFAULT NULL,
 `PROJ_NAME02` varchar(50) DEFAULT NULL,
 `PROJ_NAME03` varchar(50) DEFAULT NULL,
 `PROJ_NAME04` varchar(50) DEFAULT NULL,
 `START_DATE` datetime,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PROJ_NO`),
 KEY `IX_PROJTBM` (`PROJ_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PROJTPM` (
 `PJTP_CODE` varchar(22) NOT NULL ,
 `PJTP_NAME01` varchar(50) DEFAULT NULL,
 `PJTP_NAME02` varchar(50) DEFAULT NULL,
 `PJTP_NAME03` varchar(50) DEFAULT NULL,
 `PJTP_NAME04` varchar(50) DEFAULT NULL,
 `PJTP_RMKS` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PJTP_CODE`),
 KEY `IX_PROJTPM` (`PJTP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PRVDTLM` (
 `PR_DT` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `PR_NO` varchar(50) DEFAULT NULL,
 `REQ_DATE` datetime,
 `REQ_QTY` decimal(18,8) DEFAULT (0),
 `PR_RMKS` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PR_DT`),
 KEY `IX_PRVDTLM` (`PR_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PRVHDTM` (
 `PR_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `PR_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `REQ_DATE` datetime,
 `REQ_QTY` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PR_NO`),
 KEY `IX_PRVHDTM` (`PR_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PSCDTLM` (
 `PSC_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DIFF_QTY` decimal(18,8) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `PSC_NO` varchar(50) DEFAULT NULL,
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `STK_QTY` decimal(18,8) DEFAULT NULL,
 `TAG_QTY` decimal(18,8) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PSC_DT`),
 KEY `IX_PSCDTLM` (`PSC_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PSCHDTM` (
 `PSC_NO` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PSC_NO`),
 KEY `IX_PSCHDTM` (`PSC_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PTERMTM` (
 `PTERM_CODE` varchar(12) NOT NULL ,
 `PTERM_NAME01` varchar(50) DEFAULT NULL,
 `PTERM_NAME02` varchar(50) DEFAULT NULL,
 `PTERM_NAME03` varchar(50) DEFAULT NULL,
 `PTERM_NAME04` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PTERM_CODE`),
 KEY `IX_PTERMTM` (`PTERM_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PWODTLM` (
 `PWO_DT` varchar(50) NOT NULL ,
 `PWO_NO` varchar(50) NOT NULL ,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PWO_DT`),
 KEY `IX_PWODTLM` (`PWO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `PWOHDTM` (
 `PWO_NO` varchar(50) NOT NULL ,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PWO_NO`),
 KEY `IX_PWOHDTM` (`PWO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `REASNTM` (
 `REASN_CODE` varchar(12) NOT NULL ,
 `REASN_NAME01` varchar(50) DEFAULT NULL,
 `REASN_NAME02` varchar(50) DEFAULT NULL,
 `REASN_NAME03` varchar(50) DEFAULT NULL,
 `REASN_NAME04` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REASN_CODE`),
 KEY `IX_REASNTM` (`REASN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `REGNCDM` (
 `REGN_CODE` varchar(15) NOT NULL ,
 `REGN_NAME01` varchar(40) DEFAULT NULL,
 `REGN_NAME02` varchar(40) DEFAULT NULL,
 `REGN_NAME03` varchar(40) DEFAULT NULL,
 `REGN_NAME04` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REGN_CODE`),
 KEY `IX_REGNCDM` (`REGN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `REMKTBM` (
 `REMK_CODE` varchar(18) NOT NULL ,
 `REMK_NAME01` varchar(50) DEFAULT NULL,
 `REMK_NAME02` varchar(50) DEFAULT NULL,
 `REMK_NAME03` varchar(50) DEFAULT NULL,
 `REMK_NAME04` varchar(50) DEFAULT NULL,
 `REMK_CONTENT` longtext DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REMK_CODE`),
 KEY `IX_REMKTBM` (`REMK_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SALESTM` (
 `SALES_CODE` varchar(12) NOT NULL ,
 `DIRECT_LINE` varchar(50) DEFAULT NULL,
 `JOIN_DATE` datetime,
 `MAIL_ADDR` varchar(50) DEFAULT NULL,
 `SALES_GROUP` varchar(50) DEFAULT NULL,
 `SALES_NAME01` varchar(50) DEFAULT NULL,
 `SALES_NAME02` varchar(50) DEFAULT NULL,
 `SALES_NAME03` varchar(50) DEFAULT NULL,
 `SALES_NAME04` varchar(50) DEFAULT NULL,
 `SALES_TERM` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SALES_CODE`),
 KEY `IX_SALESTM` (`SALES_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SALTERM` (
 `SALES_TERM` varchar(50) NOT NULL ,
 `TERM_NAME01` varchar(50) DEFAULT NULL,
 `TERM_NAME02` varchar(50) DEFAULT NULL,
 `TERM_NAME03` varchar(50) DEFAULT NULL,
 `TERM_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SALES_TERM`),
 KEY `IX_SALTERM` (`SALES_TERM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SCPDTLM` (
 `SCP_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `SCP_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SCP_DT`),
 KEY `IX_SCPDTLM` (`SCP_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SCPHDTM` (
 `SCP_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SCP_NO`),
 KEY `IX_SCPHDTM` (`SCP_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SEGMTBM` (
 `SEGM_CODE` varchar(12) NOT NULL ,
 `LAST_NO` int,
 `SEGM_NAME01` varchar(50) DEFAULT NULL,
 `SEGM_NAME02` varchar(50) DEFAULT NULL,
 `SEGM_NAME03` varchar(50) DEFAULT NULL,
 `SEGM_NAME04` varchar(50) DEFAULT NULL,
 `SEGN_CODE` varchar(50) DEFAULT NULL,
 `SEGN_NAME01` varchar(50) DEFAULT NULL,
 `SEGN_NAME02` varchar(50) DEFAULT NULL,
 `SEGN_NAME03` varchar(50) DEFAULT NULL,
 `SEGN_NAME04` varchar(50) DEFAULT NULL,
 `VERSION_BIT` bit DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SEGM_CODE`),
 KEY `IX_SEGMTBM` (`SEGM_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SIZECDM` (
 `SIZE_CODE` varchar(50) NOT NULL ,
 `SIZE_NAME01` varchar(50) DEFAULT NULL,
 `SIZE_NAME02` varchar(50) DEFAULT NULL,
 `SIZE_NAME03` varchar(50) DEFAULT NULL,
 `SIZE_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SIZE_CODE`),
 KEY `IX_SIZECDM` (`SIZE_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SORDTLM` (
 `SO_DT` varchar(18) NOT NULL ,
 `DN_REQ_QTY` decimal(18,8) DEFAULT (0),
 `DO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `IV_REQ_QTY` decimal(18,8) DEFAULT (0),
 `SO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `SO_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `SO_REQ_DATE` datetime,
 `SO_NO` varchar(18) DEFAULT NULL,
 `SO_DT_RMKS` longtext DEFAULT NULL,
 `SO_ETA_DATE` datetime,
 `SO_ETD_DATE` datetime,
 `MK_REQ_QTY` decimal(20,8) DEFAULT NULL,
 `MK_REQ_DATE` datetime,
 `MK_UNIT_PRICE` decimal(20,8) DEFAULT NULL,
 `DISCOUNT_RATE` decimal(20,8) DEFAULT NULL,
 `CUS_ITEM_NO` varchar(18) DEFAULT NULL,
 `CUS_ITEM_NAME01` varchar(18) DEFAULT NULL,
 `UOM_CODE` varchar(8) DEFAULT NULL,
 `MK_UOM_CODE` varchar(8) DEFAULT NULL,
 `SERIAL_NO` int,
 `UOM_XCHG` decimal(18,8) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SO_DT`),
 KEY `IX_SORDTLM` (`SO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SORHDTM` (
 `SO_NO` varchar(15) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `BPN_CODE` varchar(15) DEFAULT NULL,
 `CUS_ORD` varchar(15) DEFAULT NULL,
 `CUS_TERM` varchar(15) DEFAULT NULL,
 `DELY_CODE` varchar(15) DEFAULT NULL,
 `ODTP_AMT` decimal(18,8) DEFAULT (0),
 `ODTP_CODE` varchar(15) DEFAULT NULL,
 `SO_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(10) DEFAULT NULL,
 `ODTP_XREV` int,
 `PTERM_CODE` varchar(15) DEFAULT NULL,
 `REGN_CODE` varchar(15) DEFAULT NULL,
 `SO_REQ_DATE` datetime,
 `CUS_REFX` varchar(18) DEFAULT NULL,
 `ORG_CTRY` varchar(18) DEFAULT NULL,
 `ORG_CERT` varchar(18) DEFAULT NULL,
 `DISCOUNT_RATE` decimal(20,8) DEFAULT NULL,
 `TAX_RATE` decimal(20,8) DEFAULT NULL,
 `SALES_CODE` varchar(15) DEFAULT NULL,
 `SVIA_CODE` varchar(15) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SO_NO`),
 KEY `IX_SORHDTM` (`SO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `STAGETM` (
 `STAGE_CODE` varchar(50) NOT NULL ,
 `STAGE_NAME01` varchar(50) DEFAULT NULL,
 `STAGE_NAME02` varchar(50) DEFAULT NULL,
 `STAGE_NAME03` varchar(50) DEFAULT NULL,
 `STAGE_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`STAGE_CODE`),
 KEY `IX_STAGETM` (`STAGE_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `STKRTBM` (
 `STK_DT` varchar(18) NOT NULL ,
 `SERIAL_NO` int,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `EXPIRE_DATE` datetime,
 `IN_DATE` datetime,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `LOCK_BIT` bit NOT NULL  DEFAULT (0),
 `NET_STK` decimal(15,8) DEFAULT (0),
 `STK_AMT` decimal(19,8) DEFAULT (0),
 `STK_QTY` decimal(19,8) DEFAULT (0),
 `STK_QTY2` decimal(19,8) DEFAULT (0),
 `TRANS_UDFX1` varchar(12) DEFAULT NULL,
 `TRANS_UDFX2` varchar(12) DEFAULT NULL,
 `TRANS_UDFX3` varchar(12) DEFAULT NULL,
 `TRANS_UDFX4` varchar(12) DEFAULT NULL,
 `TRANS_UDFX5` varchar(12) DEFAULT NULL,
 `TRANS_UDFX6` varchar(12) DEFAULT NULL,
 `UNIT_PRICE` decimal(15,8) DEFAULT (0),
 `WH_CODE` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`STK_DT`),
 KEY `IX_STKRTBM` (`STK_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `SVIATBM` (
 `SVIA_CODE` varchar(18) NOT NULL ,
 `SVIA_NAME01` varchar(40) DEFAULT NULL,
 `SVIA_NAME02` varchar(40) DEFAULT NULL,
 `SVIA_NAME03` varchar(40) DEFAULT NULL,
 `SVIA_NAME04` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SVIA_CODE`),
 KEY `IX_SVIATBM` (`SVIA_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TMRDTLM` (
 `TM_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TM_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFN1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TM_DT`),
 KEY `IX_TMRDTLM` (`TM_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TMRHDTM` (
 `TM_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `TM_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `WH_REFX` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TM_NO`),
 KEY `IX_TMRHDTM` (`TM_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TPRDTLM` (
 `TP_DT` varchar(50) NOT NULL ,
 `CYCLE_TIME` int,
 `ITEM_IJ` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `ITEM_PM` varchar(50) DEFAULT NULL,
 `MOLD_AUXI` varchar(50) DEFAULT NULL,
 `MOLD_CODE` varchar(50) DEFAULT NULL,
 `REG_RIND` decimal(18,8) DEFAULT NULL,
 `TP_NO` varchar(50) DEFAULT NULL,
 `TP_RMK` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TP_DT`),
 KEY `IX_TPRDTLM` (`TP_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TPRHDTM` (
 `TP_NO` varchar(20) NOT NULL ,
 `ASSM_NO` varchar(50) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TP_NO`),
 KEY `IX_TPRHDTM` (`TP_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TRANCDM` (
 `TRANS_CODE` varchar(8) NOT NULL ,
 `ACC_CODE01` varchar(50) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `TRANS_ODTP_CODE` varchar(50) DEFAULT NULL,
 `TRANS_TP_CODE` varchar(8) DEFAULT NULL,
 `PREFIX_CODE` varchar(50) DEFAULT NULL,
 `SIGN_CODE` varchar(8) DEFAULT NULL,
 `TRANS_NAME01` varchar(50) DEFAULT NULL,
 `TRANS_NAME02` varchar(50) DEFAULT NULL,
 `TRANS_NAME03` varchar(50) DEFAULT NULL,
 `TRANS_NAME04` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(12) DEFAULT NULL,
 `WH_REFX` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TRANS_CODE`),
 KEY `IX_TRANCDM` (`TRANS_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `TRANTBM` (
 `TRANS_NO` varchar(50) NOT NULL ,
 `BAT_DT` varchar(50) DEFAULT NULL,
 `BAT_NO` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_DATE` datetime,
 `DOC_ITM` int,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `DOC_TYPE` varchar(50) DEFAULT NULL,
 `TRANS_TP_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `OFFSET_CODE` varchar(50) DEFAULT NULL,
 `OFFSET_REC` bit NOT NULL  DEFAULT (0),
 `POST_BIT` bit NOT NULL  DEFAULT (0),
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `STK_DT` varchar(50) DEFAULT NULL,
 `TRANS_AMT` decimal(19,8) DEFAULT (0),
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_DDC` varchar(50) DEFAULT NULL,
 `TRANS_DOC` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(19,8) DEFAULT (0),
 `TRANS_QTY2` decimal(19,8) DEFAULT (0),
 `TRANS_RMK` varchar(50) DEFAULT NULL,
 `TRANS_TDC` varchar(50) DEFAULT NULL,
 `TRANS_TOC` varchar(50) DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `TRANS_UID_CODE` varchar(50) DEFAULT NULL,
 `UNIT_PRICE` decimal(19,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `BPN_CODE` varchar(12) DEFAULT NULL,
 `VOU_DT` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `WH_FM` varchar(50) DEFAULT NULL,
 `WH_REFX` varchar(50) DEFAULT NULL,
 `WH_TO` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(19,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TRANS_NO`),
 KEY `IX_TRANTBM` (`TRANS_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UDTDTLM` (
 `UDT_DT` varchar(50) NOT NULL ,
 `UDT_NO` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `FLOW_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `REASN_CODE` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_QTY` decimal(18,8) DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) DEFAULT (0),
 `TRANS_RMK` longtext DEFAULT NULL,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `TRANS_UDFS01` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS02` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS03` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS04` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS05` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS06` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS07` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS08` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS09` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS10` decimal(18,0) DEFAULT NULL,
 `TRANS_UDFS11` decimal(18,0) DEFAULT NULL,
 `UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_CODE2` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UDT_DT`),
 KEY `IX_UDTDTLM` (`UDT_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UDTHDTM` (
 `UDT_NO` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `UDT_RMKS` longtext DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UDT_NO`),
 KEY `IX_UDTHDTM` (`UDT_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UOMENTM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `UOM_CODE` varchar(8) NOT NULL ,
 `UOM_ENG` varchar(8) NOT NULL ,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`UOM_CODE`,`UOM_ENG`),
 KEY `IX_UOMENTM` (`ITEM_NO`,`UOM_CODE`,`UOM_ENG`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UOMMKTM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `UOM_CODE` varchar(8) NOT NULL ,
 `MK_UOM_CODE` varchar(8) NOT NULL ,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`UOM_CODE`,`MK_UOM_CODE`),
 KEY `IX_UOMMKTM` (`ITEM_NO`,`UOM_CODE`,`MK_UOM_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UOMPUTM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `UOM_CODE` varchar(8) NOT NULL ,
 `PU_UOM_CODE` varchar(8) NOT NULL ,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`UOM_CODE`,`PU_UOM_CODE`),
 KEY `IX_UOMPUTM` (`ITEM_NO`,`UOM_CODE`,`PU_UOM_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UOMSITM` (
 `UOM_CODE_FM` varchar(20) NOT NULL  DEFAULT '(ORG)',
 `UOM_CODE_TO` varchar(20) NOT NULL ,
 `UOM_XCHG` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UOM_CODE_FM`,`UOM_CODE_TO`),
 KEY `IX_UOMSITM` (`UOM_CODE_FM`,`UOM_CODE_TO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `UOMTBLM` (
 `UOM_CODE` varchar(8) NOT NULL ,
 `UOM_NAME01` varchar(40) DEFAULT NULL,
 `UOM_NAME02` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UOM_CODE`),
 KEY `IX_UOMTBLM` (`UOM_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VENITEM` (
 `ITEM_NO` varchar(22) NOT NULL ,
 `VEN_CODE` varchar(12) NOT NULL ,
 `ITEM_ABBRE` varchar(50) DEFAULT NULL,
 `VEN_ITEM_NO` varchar(50) DEFAULT NULL,
 `VEN_ITEM_NAME01` varchar(50) DEFAULT NULL,
 `VEN_ITEM_NAME02` varchar(50) DEFAULT NULL,
 `ITEM_NAME03` varchar(50) DEFAULT NULL,
 `ITEM_NAME04` varchar(50) DEFAULT NULL,
 `L_PO_CCY_CODE` varchar(50) DEFAULT NULL,
 `L_PO_NO` varchar(50) DEFAULT NULL,
 `L_PO_REC_DATE` datetime,
 `L_PO_REC_QTY` decimal(18,8) DEFAULT NULL,
 `L_PO_REC_WH` varchar(50) DEFAULT NULL,
 `L_PO_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `L_PO_RTV_DATE` datetime,
 `L_PO_RTV_QTY` varchar(10) DEFAULT NULL,
 `L_PO_UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `L_PO_UOM_CODE` varchar(50) DEFAULT NULL,
 `L_PO_XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `L_VQ_CCY_CODE` varchar(50) DEFAULT NULL,
 `L_VQ_NO` varchar(50) DEFAULT NULL,
 `L_VQ_REQ_DATE` datetime,
 `L_VQ_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `L_VQ_UNIT_PRICE` decimal(18,8) DEFAULT NULL,
 `L_VQ_UOM_CODE` varchar(50) DEFAULT NULL,
 `L_VQ_XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `LEAD_TM` decimal(15,8) DEFAULT (0),
 `MIN_ORD` decimal(15,8) DEFAULT (0),
 `ORDL_TM` int,
 `PKG_ORD` decimal(15,8) DEFAULT (0),
 `PUR_PRICE` decimal(15,8) DEFAULT (0),
 `VEN_UNIT_PRICE` decimal(18,7) DEFAULT (0),
 `VQT_REQ_DATE` datetime,
 `VQT_REQ_QTY` decimal(15,8) DEFAULT (0),
 `VQT_UNIT_PRICE` decimal(18,0) DEFAULT NULL,
 `VQT_CCY_CODE` varchar(50) DEFAULT NULL,
 `VQT_DT` varchar(50) DEFAULT NULL,
 `STD_CCY` varchar(50) DEFAULT NULL,
 `STD_PRICE` decimal(15,8) DEFAULT (0),
 `T_PO_REQ_AMT` decimal(18,8) DEFAULT NULL,
 `T_PO_REQ_QTY` decimal(18,8) DEFAULT NULL,
 `T_PO_RTV_QTY` decimal(18,8) DEFAULT NULL,
 `TDLY_DAY` decimal(15,8) DEFAULT (0),
 `TDLY_QTY` int,
 `TDLY_TIME` int,
 `TOL_PER` decimal(15,8) DEFAULT (0),
 `TORD_TIME` int,
 `TREV_AMT` decimal(15,8) DEFAULT (0),
 `TREV_QTY` decimal(15,8) DEFAULT (0),
 `TRTV_AMT` decimal(15,8) DEFAULT (0),
 `TRTV_QTY` decimal(15,8) DEFAULT (0),
 `UOM_CODE` varchar(6) DEFAULT NULL,
 `UOM_EXG` decimal(15,8) DEFAULT (0),
 `UOM_PUX` varchar(6) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `VEN_RMKS` longtext DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `VQT_NO` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`ITEM_NO`,`VEN_CODE`),
 KEY `IX_VENITEM` (`ITEM_NO`,`VEN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VENRTBM` (
 `VEN_CODE` varchar(20) NOT NULL ,
 `ABBR_NAME` varchar(50) DEFAULT NULL,
 `ACC_CODE01` varchar(50) DEFAULT NULL,
 `ACC_CODE02` varchar(50) DEFAULT NULL,
 `ACC_CODE03` varchar(50) DEFAULT NULL,
 `ACC_CODE04` varchar(50) DEFAULT NULL,
 `ACC_CODE05` varchar(50) DEFAULT NULL,
 `ACC_CODE06` varchar(50) DEFAULT NULL,
 `ACC_CODE07` varchar(50) DEFAULT NULL,
 `ACC_CODE08` varchar(50) DEFAULT NULL,
 `ACC_CODE09` varchar(50) DEFAULT NULL,
 `ACC_CODE10` varchar(50) DEFAULT NULL,
 `ACC_CODE11` varchar(50) DEFAULT NULL,
 `ACC_CODE12` varchar(50) DEFAULT NULL,
 `ALIAS_NAME` varchar(50) DEFAULT NULL,
 `BUYER_CODE` varchar(50) DEFAULT NULL,
 `CTRY_CODE` varchar(50) DEFAULT NULL,
 `VEN_ADR01` varchar(50) DEFAULT NULL,
 `VEN_ADR02` varchar(50) DEFAULT NULL,
 `VEN_ADR03` varchar(50) DEFAULT NULL,
 `VEN_ADR04` varchar(50) DEFAULT NULL,
 `VEN_CAB` varchar(50) DEFAULT NULL,
 `VEN_CCY` varchar(50) DEFAULT NULL,
 `VEN_CONTS` varchar(50) DEFAULT NULL,
 `VEN_CR` varchar(50) DEFAULT NULL,
 `VEN_FAX` varchar(50) DEFAULT NULL,
 `VEN_MAIL` varchar(50) DEFAULT NULL,
 `VEN_NAME01` varchar(50) DEFAULT NULL,
 `VEN_NAME02` varchar(50) DEFAULT NULL,
 `VEN_NAME03` varchar(50) DEFAULT NULL,
 `VEN_NAME04` varchar(50) DEFAULT NULL,
 `VEN_PTERM` varchar(50) DEFAULT NULL,
 `VEN_STATUS` varchar(50) DEFAULT NULL,
 `VEN_TEL` varchar(50) DEFAULT NULL,
 `VEN_TERM` varchar(50) DEFAULT NULL,
 `VEN_VIA` varchar(50) DEFAULT NULL,
 `VENTP_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `VEN_RMKS` longtext DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `VEN_ADR05` varchar(50) DEFAULT NULL,
 `VEN_ADR06` varchar(50) DEFAULT NULL,
 `VEN_ADR07` varchar(50) DEFAULT NULL,
 `VEN_ADR08` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`VEN_CODE`),
 KEY `IX_VENRTBM` (`VEN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VENTPTM` (
 `VENTP_CODE` varchar(50) NOT NULL ,
 `VENTP_NAME01` varchar(50) DEFAULT NULL,
 `VENTP_NAME02` varchar(50) DEFAULT NULL,
 `VENTP_NAME03` varchar(50) DEFAULT NULL,
 `VENTP_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`VENTP_CODE`),
 KEY `IX_VENTPTM` (`VENTP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VORDTLM` (
 `VO_DT` varchar(50) NOT NULL ,
 `VO_NO` varchar(50) DEFAULT '(0)',
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `AP_NO` varchar(50) DEFAULT NULL,
 `DOC_NO` varchar(50) DEFAULT NULL,
 `DOC_REF_NO` varchar(50) DEFAULT NULL,
 `DOC_TP_CODE` varchar(50) DEFAULT NULL,
 `DOC_REQ_DATE` datetime,
 `DOC_DUE_DATE` datetime,
 `PAY_CODE` varchar(50) DEFAULT NULL,
 `UOM_CODE` varchar(50) DEFAULT NULL,
 `REQ_QTY` decimal(18,8) DEFAULT NULL,
 `VO_DOC_NAME01` varchar(50) DEFAULT NULL,
 `RECT_NO` varchar(50) DEFAULT NULL,
 `ACC_PERIOD` varchar(50) DEFAULT NULL,
 `ACC_CODE` varchar(50) DEFAULT '(0)',
 `VO_ITEM_NAME` varchar(50) DEFAULT NULL,
 `VO_RMKS` longtext DEFAULT NULL,
 `AP_CCY_AMT` decimal(18,8) DEFAULT (0),
 `AP_DET_AMT` decimal(18,0) DEFAULT NULL,
 `AST_CODE` varchar(50) DEFAULT NULL,
 `LIFE_TIME` decimal(18,8) DEFAULT NULL,
 `LIFE_BAL` decimal(18,8) DEFAULT NULL,
 `VO_DR_DET_AMT` decimal(18,8) DEFAULT NULL,
 `VO_CR_DET_AMT` decimal(18,8) DEFAULT NULL,
 `VO_DR_CCY_AMT` decimal(18,8) DEFAULT NULL,
 `VO_CR_CCY_AMT` decimal(18,8) DEFAULT NULL,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `SIGN_CODE` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE01` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE02` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE03` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE04` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE05` varchar(50) DEFAULT NULL,
 `VO_ANAY_CODE06` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `SERIAL_NO` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`VO_DT`),
 KEY `IX_VORDTLM` (`VO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VORHDTM` (
 `VO_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `VO_DATE` datetime,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `VO_ODTP_RMKS` longtext DEFAULT NULL,
 `REVERSE_BIT` bit DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`VO_NO`),
 KEY `IX_VORHDTM` (`VO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VQTDTLM` (
 `VQT_DT` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `LEAD_TM` decimal(18,8) DEFAULT NULL,
 `MIN_ORD` decimal(18,8) DEFAULT (0),
 `PKG_ORD` decimal(18,8) DEFAULT (0),
 `PRIM_VQT` bit DEFAULT (0),
 `VQT_REQ_DATE` datetime,
 `VQT_REQ_QTY` decimal(18,8) DEFAULT (0),
 `VQT_QTY` decimal(18,8) DEFAULT NULL,
 `UOM_VQT` varchar(50) DEFAULT NULL,
 `UOM_XCHG` decimal(18,8) DEFAULT NULL,
 `VQT_UNIT_PRICE` decimal(18,8) DEFAULT (0),
 `UOM_CODE` varchar(50) DEFAULT NULL,
 `UPDATE_VEN_ITEM` bit DEFAULT (0),
 `VEN_ITEM_NO` varchar(50) DEFAULT NULL,
 `VQT_NO` varchar(50) DEFAULT NULL,
 `VQT_DT_RMKS` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `VEN_ITEM_NAME01` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`VQT_DT`),
 KEY `IX_VQTDTLM` (`VQT_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `VQTHDTM` (
 `VQT_NO` varchar(50) NOT NULL ,
 `BUYER_CODE` varchar(50) DEFAULT NULL,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `EXPIRY_DATE` datetime,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `VQT_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `PTERM_CODE` varchar(50) DEFAULT NULL,
 `VQT_REQ_DATE` datetime,
 `SVIA_CODE` varchar(50) DEFAULT NULL,
 `VEN_CODE` varchar(12) DEFAULT NULL,
 `VEN_TERM` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(18,8) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`VQT_NO`),
 KEY `IX_VQTHDTM` (`VQT_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WHCDTBM` (
 `WH_CODE` varchar(50) NOT NULL ,
 `ACC_CODE01` varchar(50) DEFAULT NULL,
 `DELY_CODE` varchar(50) DEFAULT NULL,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `FREEZE_BIT` bit DEFAULT (0),
 `NET_ABLE` bit NOT NULL  DEFAULT (0),
 `REGN_CODE` varchar(50) DEFAULT NULL,
 `STK_TAG` decimal(15,8) DEFAULT (0),
 `WH_ADR01` varchar(50) DEFAULT NULL,
 `WH_ADR02` varchar(50) DEFAULT NULL,
 `WH_ADR03` varchar(50) DEFAULT NULL,
 `WH_ADR04` varchar(50) DEFAULT NULL,
 `WH_CONT` varchar(50) DEFAULT NULL,
 `WH_COST` bit DEFAULT (0),
 `WH_DUMY` bit NOT NULL  DEFAULT (0),
 `WH_FAX` varchar(50) DEFAULT NULL,
 `WH_GROUP` varchar(50) DEFAULT NULL,
 `WH_NAME01` varchar(50) DEFAULT NULL,
 `WH_NAME02` varchar(50) DEFAULT NULL,
 `WH_NAME03` varchar(50) DEFAULT NULL,
 `WH_NAME04` varchar(50) DEFAULT NULL,
 `WH_TEL` varchar(50) DEFAULT NULL,
 `WH_CLASS` varchar(50) DEFAULT NULL,
 `WH_UDFX01` varchar(20) DEFAULT NULL,
 `WH_UDFX02` varchar(20) DEFAULT NULL,
 `WH_UDFX03` varchar(20) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`WH_CODE`),
 KEY `IX_WHCDTBM` (`WH_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WHLOCTM` (
 `LOC_CODE` varchar(20) NOT NULL ,
 `WH_CODE` varchar(20) NOT NULL ,
 `WHLOC_NAME01` varchar(50) DEFAULT NULL,
 `WHLOC_NAME02` varchar(50) DEFAULT NULL,
 `WHLOC_NAME03` varchar(50) DEFAULT NULL,
 `WHLOC_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LOC_CODE`,`WH_CODE`),
 KEY `IX_WHLOCTM` (`LOC_CODE`,`WH_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WMIDTLM` (
 `WI_DT` varchar(50) NOT NULL ,
 `CCY_CODE` varchar(3) NOT NULL ,
 `DOC_NO` varchar(50) NOT NULL ,
 `FLOW_CODE` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(22) NOT NULL ,
 `WI_NO` varchar(50) NOT NULL ,
 `REFX_NO` varchar(50) NOT NULL ,
 `TRANS_QTY` decimal(18,8) NOT NULL  DEFAULT (0),
 `TRANS_QTY2` decimal(18,8) NOT NULL  DEFAULT (0),
 `TRANS_RMK` longtext NOT NULL ,
 `TRANS_UDF11` varchar(50) NOT NULL ,
 `TRANS_UDF12` varchar(50) NOT NULL ,
 `TRANS_UDF13` varchar(50) NOT NULL ,
 `TRANS_UDF14` varchar(50) NOT NULL ,
 `TRANS_UDF15` varchar(50) NOT NULL ,
 `TRANS_UDF16` varchar(50) NOT NULL ,
 `TRANS_UDF17` varchar(50) NOT NULL ,
 `TRANS_UDF18` varchar(50) NOT NULL ,
 `TRANS_UDF19` varchar(50) NOT NULL ,
 `TRANS_UDF20` varchar(50) NOT NULL ,
 `TRANS_UDFX1` varchar(50) NOT NULL ,
 `TRANS_UDFX2` varchar(50) NOT NULL ,
 `TRANS_UDFX3` varchar(50) NOT NULL ,
 `TRANS_UDFX4` varchar(50) NOT NULL ,
 `TRANS_UDFX5` varchar(50) NOT NULL ,
 `TRANS_UDFX6` varchar(50) NOT NULL ,
 `UNIT_PRICE` decimal(18,8) NOT NULL  DEFAULT (0),
 `UOM_CODE` varchar(6) NOT NULL ,
 `UOM_CODE2` varchar(50) NOT NULL ,
 `XCHG_RATE` decimal(18,8) NOT NULL  DEFAULT (0),
 `ZADD_DATE` datetime NOT NULL ,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime NOT NULL ,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) NOT NULL ,
 `ZSECURITY_CODE4` varchar(12) NOT NULL ,
 `ZSECURITY_CODE5` varchar(12) NOT NULL ,
 `ZSECURITY_CODE6` varchar(12) NOT NULL ,
 `ZSECURITY_RIGHT` int NOT NULL ,
 `SERIAL_NO` int NOT NULL ,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`WI_DT`),
 KEY `IX_WMIDTLM` (`WI_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WMIHDTM` (
 `WI_NO` varchar(20) NOT NULL ,
 `CCY_CODE` varchar(3) DEFAULT NULL,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `REFX_NO` varchar(50) DEFAULT NULL,
 `TRANS_CODE` varchar(50) DEFAULT NULL,
 `TRANS_DATE` datetime,
 `TRANS_UDF11` varchar(50) DEFAULT NULL,
 `TRANS_UDF12` varchar(50) DEFAULT NULL,
 `TRANS_UDF13` varchar(50) DEFAULT NULL,
 `TRANS_UDF14` varchar(50) DEFAULT NULL,
 `TRANS_UDF15` varchar(50) DEFAULT NULL,
 `TRANS_UDF16` varchar(50) DEFAULT NULL,
 `TRANS_UDF17` varchar(50) DEFAULT NULL,
 `TRANS_UDF18` varchar(50) DEFAULT NULL,
 `TRANS_UDF19` varchar(50) DEFAULT NULL,
 `TRANS_UDF20` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `XCHG_RATE` decimal(15,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`WI_NO`),
 KEY `IX_WMIHDTM` (`WI_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WORDTLM` (
 `WO_DT` varchar(50) NOT NULL ,
 `HAND_CODE` varchar(50) DEFAULT NULL,
 `WO_MI_AMT` decimal(18,8) DEFAULT NULL,
 `WO_MI_QTY` decimal(18,8) DEFAULT NULL,
 `ITEM_NO` varchar(20) DEFAULT NULL,
 `WO_REQ_DATE` datetime,
 `WO_REQ_QTY` decimal(18,8) DEFAULT (0),
 `WO_RTN_AMT` decimal(18,8) DEFAULT NULL,
 `WO_RTN_QTY` decimal(18,8) DEFAULT NULL,
 `WO_NO` varchar(50) DEFAULT NULL,
 `WO_DT_RMKS` longtext DEFAULT NULL,
 `WO_FG_AMT` decimal(18,8) DEFAULT NULL,
 `WO_FG_QTY` decimal(18,8) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`WO_DT`),
 KEY `IX_WORDTLM` (`WO_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `WORHDTM` (
 `WO_NO` varchar(50) NOT NULL ,
 `COMP_CODE` varchar(8) DEFAULT NULL,
 `CTR_CODE` varchar(50) DEFAULT NULL,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `MO_DT` varchar(50) DEFAULT NULL,
 `MO_NO` varchar(50) DEFAULT NULL,
 `ODTP_CODE` varchar(50) DEFAULT NULL,
 `WO_ODTP_RMKS` longtext DEFAULT NULL,
 `ODTP_STATUS` varchar(50) DEFAULT NULL,
 `ODTP_XREV` int,
 `ASSM_REQ_DATE` datetime,
 `ASSM_REQ_QTY` decimal(18,8) DEFAULT (0),
 `ASSM_FG_AMT` decimal(18,8) DEFAULT (0),
 `ASSM_FG_QTY` decimal(18,8) DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ITEM_REQ_DATE` datetime,
 `BPN_CODE` varchar(50) DEFAULT NULL,
 PRIMARY KEY (`WO_NO`),
 KEY `IX_WORHDTM` (`WO_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNAGENTM` (
 `AUTHORIZED_AGENT` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `ACTIVE_FM` datetime,
 `ACTIVE_TO` datetime,
 `LOGON_MD5` varchar(50) DEFAULT NULL,
 `USER_NAME01` varchar(50) DEFAULT NULL,
 `USER_NAME02` varchar(50) DEFAULT NULL,
 `USER_NAME03` varchar(50) DEFAULT NULL,
 `USER_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`AUTHORIZED_AGENT`,`LOGON_ID`),
 KEY `IX_ZNAGENTM` (`AUTHORIZED_AGENT`,`LOGON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNAPVCDM` (
 `APPV_CODE` varchar(50) NOT NULL ,
 `APPV_NAME01` varchar(50) DEFAULT NULL,
 `APPV_NAME02` varchar(50) DEFAULT NULL,
 `APPV_NAME03` varchar(50) DEFAULT NULL,
 `APPV_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`APPV_CODE`),
 KEY `IX_ZNAPVCDM` (`APPV_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCDFTBM` (
 `UID_CODE` varchar(20) NOT NULL ,
 `CDF_CLASS_CODE` varchar(20) NOT NULL ,
 `CDF_CODE` varchar(40) NOT NULL ,
 `CDF_DEFAULT` varchar(40) DEFAULT NULL,
 `CDF_LENGTH` int,
 `CDF_USAGE` bit DEFAULT NULL,
 `CDF_TP_CODE` varchar(12) DEFAULT NULL,
 `COLUMN_NULLABLE` bit DEFAULT NULL,
 `COLUMN_SCALE` int,
 `ORDINAL` int,
 `LABEL_ID` varchar(50) DEFAULT NULL,
 `CDF_NAME01` varchar(50) DEFAULT NULL,
 `CDF_NAME02` varchar(50) DEFAULT NULL,
 `CDF_NAME03` varchar(50) DEFAULT NULL,
 `CDF_NAME04` varchar(50) DEFAULT NULL,
 `STAGEU_STATUS` varchar(50) DEFAULT NULL,
 `STAGEA_STATUS` varchar(50) DEFAULT NULL,
 `STAGEB_STATUS` varchar(50) DEFAULT NULL,
 `STAGEC_STATUS` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UID_CODE`,`CDF_CLASS_CODE`,`CDF_CODE`),
 KEY `IX_ZNCDFTBM` (`UID_CODE`,`CDF_CLASS_CODE`,`CDF_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCFGTBM` (
 `ROLE_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `VART_CODE` varchar(20) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `VART_VALUE` varchar(50) DEFAULT NULL,
 `VART_TP_CODE` varchar(10) DEFAULT NULL,
 `VART_CLASS_CODE` varchar(10) DEFAULT NULL,
 `VART_NAME01` varchar(50) DEFAULT NULL,
 `VART_NAME02` varchar(50) DEFAULT NULL,
 `VART_NAME03` varchar(50) DEFAULT NULL,
 `VART_NAME04` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ROLE_CODE`,`LOGON_ID`,`VART_CODE`),
 KEY `IX_ZNCFGTBM` (`ROLE_CODE`,`LOGON_ID`,`VART_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCLIPBM` (
 `CLIP_CODE` varchar(18) NOT NULL ,
 `CLIP_CLASS_CODE` varchar(50) DEFAULT NULL,
 `CLIP_CONT` longtext DEFAULT NULL,
 `CLIP_FORMAT` varchar(50) DEFAULT NULL,
 `CLIP_NAME01` varchar(50) DEFAULT NULL,
 `CLIP_NAME02` varchar(50) DEFAULT NULL,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CLIP_CODE`),
 KEY `IX_ZNCLIPBM` (`CLIP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCOMDTM` (
 `COMBO_CODE` varchar(20) NOT NULL ,
 `COMBO_VALUE` varchar(50) NOT NULL ,
 `COMBO_NAME1` varchar(50) DEFAULT NULL,
 `COMBO_NAME2` varchar(50) DEFAULT NULL,
 `COMBO_NAME3` varchar(50) DEFAULT NULL,
 `COMBO_NAME4` varchar(50) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT NULL,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COMBO_CODE`,`COMBO_VALUE`),
 KEY `IX_ZNCOMDTM` (`COMBO_CODE`,`COMBO_VALUE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCOMHDM` (
 `COMBO_CODE` varchar(20) NOT NULL ,
 `COMBO_NAME1` varchar(50) DEFAULT NULL,
 `COMBO_NAME2` varchar(50) DEFAULT NULL,
 `COMBO_NAME3` varchar(50) DEFAULT NULL,
 `COMBO_NAME4` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COMBO_CODE`),
 KEY `IX_ZNCOMHDM` (`COMBO_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCOMPTM` (
 `COMP_CODE` varchar(8) NOT NULL ,
 `ABBR_NAME` varchar(12) DEFAULT NULL,
 `ACC_CODE01` varchar(10) DEFAULT NULL,
 `COMP_ADR01` varchar(50) DEFAULT NULL,
 `COMP_ADR02` varchar(50) DEFAULT NULL,
 `COMP_ADR03` varchar(50) DEFAULT NULL,
 `COMP_ADR04` varchar(50) DEFAULT NULL,
 `COMP_ADR05` varchar(50) DEFAULT NULL,
 `COMP_ADR06` varchar(50) DEFAULT NULL,
 `COMP_ADR07` varchar(50) DEFAULT NULL,
 `COMP_ADR08` varchar(50) DEFAULT NULL,
 `COMP_CBL` varchar(50) DEFAULT NULL,
 `COMP_CONT` varchar(50) DEFAULT NULL,
 `COMP_FAX` varchar(50) DEFAULT NULL,
 `COMP_NAME01` varchar(50) DEFAULT NULL,
 `COMP_NAME02` varchar(50) DEFAULT NULL,
 `COMP_NAME03` varchar(50) DEFAULT NULL,
 `COMP_NAME04` varchar(50) DEFAULT NULL,
 `COMP_TEL` varchar(50) DEFAULT NULL,
 `WH_UDFX01` varchar(20) DEFAULT NULL,
 `WH_UDFX02` varchar(20) DEFAULT NULL,
 `WH_UDFX03` varchar(20) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COMP_CODE`),
 KEY `IX_ZNCOMPTM` (`COMP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCONDTM` (
 `CONDI_NO` varchar(50) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `UID_CODE` varchar(50) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ROLE_CODE` varchar(12) DEFAULT NULL,
 `USQL_CODE` varchar(50) DEFAULT NULL,
 `CONDT_NAME01` varchar(50) DEFAULT NULL,
 `CONDT_NAME02` varchar(50) DEFAULT NULL,
 `CONDT_NAME03` varchar(50) DEFAULT NULL,
 `CONDT_NAME04` varchar(50) DEFAULT NULL,
 `ORDER_CLAUSE` longtext DEFAULT NULL,
 `WHERE_CLAUSE` longtext DEFAULT NULL,
 `DEFAULT_BIT` bit DEFAULT NULL,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`CONDI_NO`),
 KEY `IX_ZNCONDTM` (`CONDI_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNCSSTBM` (
 `THEME_CODE` varchar(50) NOT NULL ,
 `CLASS_NAME` varchar(50) NOT NULL ,
 `Attribute_NAME` varchar(50) NOT NULL ,
 `Attribute_DATA` varchar(100) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`THEME_CODE`,`CLASS_NAME`,`Attribute_NAME`),
 KEY `IX_ZNCSSTBM` (`THEME_CODE`,`CLASS_NAME`,`Attribute_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNDEPTBM` (
 `DEPT_CODE` varchar(50) NOT NULL ,
 `DEPT_DIR` varchar(20) DEFAULT NULL,
 `DEPT_NAME01` varchar(50) DEFAULT NULL,
 `DEPT_NAME02` varchar(50) DEFAULT NULL,
 `DEPT_NAME03` varchar(50) DEFAULT NULL,
 `DEPT_NAME04` varchar(50) DEFAULT NULL,
 `DEPT_RMKS` longtext DEFAULT NULL,
 `DEPT_TEL` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`DEPT_CODE`),
 KEY `IX_ZNDEPTBM` (`DEPT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNDESKTM` (
 `DESK_DT` varchar(50) NOT NULL ,
 `ROLE_CODE` varchar(50) DEFAULT NULL,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT (0),
 `LABEL_ID` varchar(30) DEFAULT NULL,
 `VURL_CODE` varchar(50) DEFAULT NULL,
 `ICON_X` int,
 `ICON_Y` int,
 `ICON_NAME` varchar(50) DEFAULT NULL,
 `AUTO_BIT` bit DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`DESK_DT`),
 KEY `IX_ZNDESKTM` (`DESK_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNDOCKTM` (
 `DOCK_DT` varchar(50) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `LABEL_ID` varchar(30) DEFAULT NULL,
 `DOCK_CODE` varchar(200) DEFAULT NULL,
 `ICON_NAME` varchar(50) DEFAULT NULL,
 `DOCK_OUT` varchar(50) DEFAULT NULL,
 `ORDINAL` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`DOCK_DT`),
 KEY `IX_ZNDOCKTM` (`DOCK_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNIPADRM` (
 `ADDRESS_DT` varchar(18) NOT NULL ,
 `UID_CODE` varchar(20) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ROLE_CODE` varchar(12) DEFAULT NULL,
 `ACCESS_CODE` varchar(20) DEFAULT NULL,
 `ACCESS_DATE_FM` datetime,
 `ACCESS_DATE_TO` datetime,
 `ACCESS_TIME_FM` varchar(20) DEFAULT NULL,
 `ACCESS_TIME_TO` varchar(20) DEFAULT NULL,
 `IP_ADDRESS` varchar(30) DEFAULT NULL,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ADDRESS_DT`),
 KEY `IX_ZNIPADRM` (`ADDRESS_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNLANGFX` (
 `LANG_CHT` varchar(50) NOT NULL ,
 `LANG_FX` varchar(50) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`LANG_CHT`),
 KEY `IX_ZNLANGFX` (`LANG_CHT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNLOGTBM` (
 `AUTO_RECN` int NOT NULL ,
 `ATVT_CODE` varchar(50) DEFAULT NULL,
 `ATVT_ADDR` varchar(50) DEFAULT NULL,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ATVT_DATA` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`AUTO_RECN`),
 KEY `IX_ZNLOGTBM` (`AUTO_RECN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNOPTDTM` (
 `UID_CODE` varchar(20) DEFAULT NULL,
 `COLUMN_NAME` varchar(50) NOT NULL ,
 `OPT_VALUE` varchar(50) NOT NULL ,
 `LABEL_ID` varchar(30) DEFAULT NULL,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COLUMN_NAME`,`OPT_VALUE`),
 KEY `IX_ZNOPTDTM` (`COLUMN_NAME`,`OPT_VALUE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNOPTHDM` (
 `UID_CODE` varchar(20) DEFAULT NULL,
 `COLUMN_NAME` varchar(50) NOT NULL ,
 `OPT_DEFAULT` varchar(50) DEFAULT NULL,
 `OPT_NAME1` varchar(50) DEFAULT NULL,
 `OPT_NAME2` varchar(50) DEFAULT NULL,
 `OPT_NAME3` varchar(50) DEFAULT NULL,
 `OPT_NAME4` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COLUMN_NAME`),
 KEY `IX_ZNOPTHDM` (`COLUMN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNREQTBM` (
 `REQ_CODE` varchar(50) NOT NULL ,
 `OPT_CODE` varchar(50) DEFAULT NULL,
 `REQ_NAME01` varchar(50) DEFAULT NULL,
 `REQ_NAME02` varchar(50) DEFAULT NULL,
 `REQ_RMKS` longtext DEFAULT NULL,
 `REQ_STATUS` varchar(50) DEFAULT NULL,
 `START_BIT` bit DEFAULT NULL,
 `REQ_USER` varchar(50) DEFAULT NULL,
 `REQ_URL` varchar(50) DEFAULT NULL,
 `REQ_OPT` longtext DEFAULT NULL,
 `TASK_REQ_DATE` datetime,
 `TASK_REQ_TIME` varchar(15) DEFAULT NULL,
 `TASK_RUN_DATE` datetime,
 `TASK_RUN_TIME` varchar(15) DEFAULT NULL,
 `START_DATE` datetime,
 `START_TIME` varchar(15) DEFAULT NULL,
 `START_CLASS` varchar(10) DEFAULT NULL,
 `START_OPT01` bit DEFAULT NULL,
 `START_OPT02` bit DEFAULT NULL,
 `START_OPT03` bit DEFAULT NULL,
 `START_OPT04` bit DEFAULT NULL,
 `START_OPT05` bit DEFAULT NULL,
 `START_OPT06` bit DEFAULT NULL,
 `START_OPT07` bit DEFAULT NULL,
 `START_OPT08` bit DEFAULT NULL,
 `START_OPT09` bit DEFAULT NULL,
 `START_OPT10` bit DEFAULT NULL,
 `START_OPT11` bit DEFAULT NULL,
 `START_OPT12` bit DEFAULT NULL,
 `START_OPT13` int,
 `START_OPT14` int,
 `START_OPT15` longtext DEFAULT NULL,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `TASK_CLASS` varchar(2) DEFAULT NULL,
 `TASK_FM` datetime,
 `TASK_INT` int,
 `TASK_NEXT` varchar(50) DEFAULT NULL,
 `TASK_OPT` varchar(50) DEFAULT NULL,
 `TASK_TIME` varchar(50) DEFAULT NULL,
 `TASK_TO` datetime,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REQ_CODE`),
 KEY `IX_ZNREQTBM` (`REQ_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNRIGHTM` (
 `ROLE_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `UID_CODE` varchar(20) NOT NULL ,
 `ACCESS_ATTRIBUTE` int,
 `ALLOW_ACCESS` bit DEFAULT (0),
 `ALLOW_ADDNEW` bit NOT NULL  DEFAULT (0),
 `ALLOW_UPDATE` bit NOT NULL  DEFAULT (0),
 `ALLOW_DELETE` bit NOT NULL  DEFAULT (0),
 `ALLOW_OTHER` bit NOT NULL  DEFAULT (0),
 `ALLOW_POSTE` bit NOT NULL  DEFAULT (0),
 `ALLOW_PRINT` bit NOT NULL  DEFAULT (0),
 `ALLOW_RATIFY` bit NOT NULL  DEFAULT (0),
 `ACCESS_RT_CODE01` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE02` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE03` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE04` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE05` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE06` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE07` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE08` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE09` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE10` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE11` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE12` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE13` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE14` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE15` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE16` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE17` varchar(10) DEFAULT NULL,
 `ACCESS_RT_CODE18` varchar(10) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ROLE_CODE`,`LOGON_ID`,`UID_CODE`),
 KEY `IX_ZNRIGHTM` (`ROLE_CODE`,`LOGON_ID`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNROLETM` (
 `ROLE_CODE` varchar(12) NOT NULL ,
 `ROLE_NAME01` varchar(40) DEFAULT NULL,
 `ROLE_NAME02` varchar(40) DEFAULT NULL,
 `ROLE_NAME03` varchar(40) DEFAULT NULL,
 `ROLE_NAME04` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ROLE_CODE`),
 KEY `IX_ZNROLETM` (`ROLE_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNRTCDTM` (
 `ACCESS_RT_CODE` varchar(50) NOT NULL ,
 `ACCESS_RT_NAME01` varchar(50) DEFAULT NULL,
 `ACCESS_RT_NAME02` varchar(50) DEFAULT NULL,
 `ACCESS_RT_NAME03` varchar(50) DEFAULT NULL,
 `ACCESS_RT_NAME04` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`ACCESS_RT_CODE`),
 KEY `IX_ZNRTCDTM` (`ACCESS_RT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNSIGNTM` (
 `SIGN_CODE` varchar(32) NOT NULL ,
 `SIGN_DATE` datetime NOT NULL ,
 `SIGN_DATA` longtext DEFAULT NULL,
 `SIGN_STATUS` varchar(12) DEFAULT NULL,
 `ORDINAL` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SIGN_ODTP_CODE` varchar(12) DEFAULT NULL,
 PRIMARY KEY (`SIGN_CODE`),
 KEY `IX_ZNSIGNTM` (`SIGN_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNSMSTBM` (
 `SMS_ID` varchar(50) NOT NULL ,
 `SMS_SENDER` varchar(50) DEFAULT NULL,
 `SMS_INCEPT` varchar(50) DEFAULT NULL,
 `SMS_TITLE` varchar(50) DEFAULT NULL,
 `SMS_CONTENT` longtext DEFAULT NULL,
 `READ_BIT` bit DEFAULT NULL,
 `SENT_BIT` bit DEFAULT NULL,
 `DELF_BIT` bit DEFAULT NULL,
 `DELT_BIT` bit DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`SMS_ID`),
 KEY `IX_ZNSMSTBM` (`SMS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNSNSTKM` (
 `STK_DT` varchar(50) NOT NULL ,
 `ITEM_NO` varchar(22) DEFAULT NULL,
 `TRANS_UDFX1` varchar(50) DEFAULT NULL,
 `TRANS_UDFX2` varchar(50) DEFAULT NULL,
 `TRANS_UDFX3` varchar(50) DEFAULT NULL,
 `TRANS_UDFX4` varchar(50) DEFAULT NULL,
 `TRANS_UDFX5` varchar(50) DEFAULT NULL,
 `TRANS_UDFX6` varchar(50) DEFAULT NULL,
 `WH_CODE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `SERIAL_NO` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`STK_DT`),
 KEY `IX_ZNSNSTKM` (`STK_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNSSDTBM` (
 `LOGON_SSD` varchar(40) NOT NULL ,
 `LOGON_DB` varchar(50) DEFAULT NULL,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `LOGON_IP` varchar(20) DEFAULT NULL,
 `LOGON_LANG` varchar(50) DEFAULT NULL,
 `LOGON_SVR` varchar(50) DEFAULT NULL,
 `LOGON_PIXELS` varchar(15) DEFAULT NULL,
 `LOGON_DATE_FMT` varchar(50) DEFAULT NULL,
 `LOGON_DATE_SEP` varchar(50) DEFAULT NULL,
 `LOGON_AGENT_MD5` varchar(50) DEFAULT NULL,
 `LOGON_TICK` datetime,
 `LOGON_TICKS` int,
 `LOGON_IDLE` datetime,
 `LOGON_IDLES` int,
 `LOGON_UID_CODE` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `LOGON_SCALE` varchar(4) DEFAULT NULL,
 PRIMARY KEY (`LOGON_SSD`),
 KEY `IX_ZNSSDTBM` (`LOGON_SSD`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNTABLEM` (
 `ROLE_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `TABLE_NAME` varchar(50) NOT NULL ,
 `ACCESS_CODE1` varchar(32) DEFAULT NULL,
 `ACCESS_CODE2` varchar(32) DEFAULT NULL,
 `ACCESS_CODE3` varchar(32) DEFAULT NULL,
 `ACCESS_CODE4` varchar(32) DEFAULT NULL,
 `ACCESS_CODE5` varchar(32) DEFAULT NULL,
 `ACCESS_CODE6` varchar(32) DEFAULT NULL,
 `ACCESS_FM` int,
 `ACCESS_TO` int,
 `DATA_ACCESS` bit NOT NULL  DEFAULT (0),
 `SECURITY_CODE1` varchar(8) DEFAULT NULL,
 `SECURITY_CODE2` varchar(8) DEFAULT NULL,
 `SECURITY_CODE3` varchar(8) DEFAULT NULL,
 `SECURITY_CODE4` varchar(8) DEFAULT NULL,
 `SECURITY_CODE5` varchar(8) DEFAULT NULL,
 `SECURITY_CODE6` varchar(8) DEFAULT NULL,
 `SECURITY_RIGHT` int,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `UPDATE_CODE1` varchar(32) DEFAULT NULL,
 `UPDATE_CODE2` varchar(32) DEFAULT NULL,
 `UPDATE_CODE3` varchar(32) DEFAULT NULL,
 `UPDATE_CODE4` varchar(32) DEFAULT NULL,
 `UPDATE_CODE5` varchar(32) DEFAULT NULL,
 `UPDATE_CODE6` varchar(32) DEFAULT NULL,
 `UPDATE_FM` int,
 `UPDATE_TO` int,
 `DELETE_CODE1` varchar(32) DEFAULT NULL,
 `DELETE_CODE2` varchar(32) DEFAULT NULL,
 `DELETE_CODE3` varchar(32) DEFAULT NULL,
 `DELETE_CODE4` varchar(32) DEFAULT NULL,
 `DELETE_CODE5` varchar(32) DEFAULT NULL,
 `DELETE_CODE6` varchar(32) DEFAULT NULL,
 `DELETE_FM` int,
 `DELETE_TO` int,
 `WHERE_CLAUSE` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ROLE_CODE`,`LOGON_ID`,`TABLE_NAME`),
 KEY `IX_ZNTABLEM` (`ROLE_CODE`,`LOGON_ID`,`TABLE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNTHEMEM` (
 `THEME_CODE` varchar(50) NOT NULL ,
 `UID_CODE` varchar(50) NOT NULL ,
 `TABLE_NAME` varchar(50) NOT NULL ,
 `COLUMN_NAME` varchar(50) NOT NULL ,
 `COLUMN_COLS` int,
 `COLUMN_ROWS` int,
 `COLUMN_NROW` bit DEFAULT NULL,
 `COLUMN_H` int,
 `COLUMN_W` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ORDINAL` int,
 PRIMARY KEY (`THEME_CODE`,`UID_CODE`,`TABLE_NAME`,`COLUMN_NAME`),
 KEY `IX_ZNTHEMEM` (`THEME_CODE`,`UID_CODE`,`TABLE_NAME`,`COLUMN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNTODOTM` (
 `TODO_CODE` varchar(50) NOT NULL ,
 `DUE_DATE` datetime,
 `FINAL_DATE` datetime,
 `PRIT_CODE` varchar(5) DEFAULT NULL,
 `START_DATE` datetime,
 `TODO_TAG` varchar(50) DEFAULT NULL,
 `TODO_WORD` varchar(50) DEFAULT NULL,
 `TODO_CLASS` varchar(50) DEFAULT NULL,
 `TODO_NAME01` varchar(50) DEFAULT NULL,
 `TODO_NAME02` varchar(50) DEFAULT NULL,
 `TODO_NAME03` varchar(50) DEFAULT NULL,
 `TODO_NAME04` varchar(50) DEFAULT NULL,
 `TODO_RMKS` longtext DEFAULT NULL,
 `TODO_STATUS` varchar(8) DEFAULT NULL,
 `TRGT_FINAL` datetime,
 `TRGT_START` datetime,
 `LOGON_ID` varchar(12) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TODO_CODE`),
 KEY `IX_ZNTODOTM` (`TODO_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNUSERTM` (
 `LOGON_ID` varchar(12) NOT NULL ,
 `ACCESS_CODE1` varchar(8) DEFAULT NULL,
 `ACCESS_CODE2` varchar(8) DEFAULT NULL,
 `ACCESS_CODE3` varchar(8) DEFAULT NULL,
 `ACCESS_CODE4` varchar(8) DEFAULT NULL,
 `ACCESS_CODE5` varchar(8) DEFAULT NULL,
 `ACCESS_CODE6` varchar(8) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT (0),
 `ACTIVE_FM` datetime,
 `ACTIVE_TO` datetime,
 `ALIAS_NAME` varchar(50) DEFAULT NULL,
 `COMP_CODE` varchar(50) DEFAULT NULL,
 `DEPT_CODE` varchar(50) DEFAULT NULL,
 `EMAIL_ADDR` varchar(50) DEFAULT NULL,
 `LICGP_CODE` varchar(50) DEFAULT NULL,
 `LOGON_LANG` varchar(50) DEFAULT NULL,
 `PASS_CODE` varchar(50) DEFAULT NULL,
 `ROLE_CODE` varchar(50) DEFAULT NULL,
 `USER_NAME01` varchar(50) DEFAULT NULL,
 `USER_NAME02` varchar(50) DEFAULT NULL,
 `USER_NAME03` varchar(50) DEFAULT NULL,
 `USER_NAME04` varchar(50) DEFAULT NULL,
 `USER_DATE_FMT` varchar(20) DEFAULT NULL,
 `USER_DATE_SEP` varchar(2) DEFAULT NULL,
 `LOGON_MD5` varchar(50) DEFAULT NULL,
 `USER_FONT_NAME` varchar(50) DEFAULT NULL,
 `USER_FONT_SIZE` int,
 `WRONG_DATE` datetime,
 `WRONG_TIMES` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LOGON_ID`),
 KEY `IX_ZNUSERTM` (`LOGON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNUSRAPM` (
 `APPV_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`APPV_CODE`,`LOGON_ID`),
 KEY `IX_ZNUSRAPM` (`APPV_CODE`,`LOGON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNUSRDFM` (
 `UID_CODE` varchar(50) NOT NULL ,
 `USRDF_CODE` varchar(50) NOT NULL ,
 `ROLE_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `HIDDEN_BIT` bit DEFAULT (0),
 `USRDF_REFX` varchar(50) DEFAULT NULL,
 `USRDF_DATA` varchar(50) DEFAULT NULL,
 `STAGEU_STATUS` varchar(50) DEFAULT NULL,
 `STAGEA_STATUS` varchar(50) DEFAULT NULL,
 `STAGEB_STATUS` varchar(50) DEFAULT NULL,
 `STAGEC_STATUS` varchar(50) DEFAULT NULL,
 `USRDF_NAME01` varchar(50) DEFAULT NULL,
 `USRDF_NAME02` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UID_CODE`,`USRDF_CODE`,`ROLE_CODE`,`LOGON_ID`),
 KEY `IX_ZNUSRDFM` (`UID_CODE`,`USRDF_CODE`,`ROLE_CODE`,`LOGON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZNVARTBM` (
 `ROLE_CODE` varchar(12) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `VART_CODE` varchar(20) NOT NULL ,
 `VART_VALUE` varchar(50) DEFAULT NULL,
 `VART_NAME01` varchar(50) DEFAULT NULL,
 `VART_NAME02` varchar(50) DEFAULT NULL,
 `VART_NAME03` varchar(50) DEFAULT NULL,
 `VART_NAME04` varchar(50) DEFAULT NULL,
 `VART_TP_CODE` varchar(10) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ROLE_CODE`,`LOGON_ID`,`VART_CODE`),
 KEY `IX_ZNVARTBM` (`ROLE_CODE`,`LOGON_ID`,`VART_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZTCLASSM` (
 `COLUMN_CLASS_CODE` varchar(40) NOT NULL ,
 `COLUMN_LENGTH` int,
 `COLUMN_SCALE` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`COLUMN_CLASS_CODE`),
 KEY `IX_ZTCLASSM` (`COLUMN_CLASS_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUATVTBM` (
 `STATUS_CODE` varchar(18) NOT NULL ,
 `BTN_ATVT_CODE` varchar(18) NOT NULL ,
 `DEFINED_CODE` varchar(50) DEFAULT NULL,
 `FUNCTION_CODE` varchar(50) DEFAULT NULL,
 `SIGN_ATVT_CODE` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`STATUS_CODE`,`BTN_ATVT_CODE`),
 KEY `IX_ZUATVTBM` (`STATUS_CODE`,`BTN_ATVT_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUBTNSTM` (
 `XBAR_CODE` varchar(18) NOT NULL ,
 `VIEW_STAGEU_CODE` varchar(18) NOT NULL ,
 `BUTTON_ID` varchar(18) NOT NULL ,
 `BTN_ATVT_CODE` varchar(50) DEFAULT NULL,
 `STATUS_CODE` varchar(50) DEFAULT NULL,
 `DATA_STATUS_CODE` varchar(50) DEFAULT NULL,
 `ODTP_STATUS_CODE` varchar(50) DEFAULT NULL,
 `BTN_CLASS_CODE` varchar(50) DEFAULT NULL,
 `BTN_HK_CODE` varchar(50) DEFAULT NULL,
 `BTN_LABEL_ID` varchar(30) DEFAULT NULL,
 `TITLE_ID` varchar(50) DEFAULT NULL,
 `BTN_MSG_ID` varchar(50) DEFAULT NULL,
 `ORDINAL` int,
 `STATUS_CODE_T` varchar(50) DEFAULT NULL,
 `STAGEU_CODE_T` varchar(50) DEFAULT NULL,
 `XEVENT_CODE` varchar(200) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `BTN_IMG_ID` varchar(20) DEFAULT NULL,
 PRIMARY KEY (`XBAR_CODE`,`VIEW_STAGEU_CODE`,`BUTTON_ID`),
 KEY `IX_ZUBTNSTM` (`XBAR_CODE`,`VIEW_STAGEU_CODE`,`BUTTON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUCACHEM` (
 `LOGON_CACHE` varchar(50) NOT NULL ,
 `LOGON_NDX` int NOT NULL ,
 `LOGON_SSD` varchar(36) DEFAULT NULL,
 `LOGON_CONTEXT` longtext DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `LOGON_TP_CODE` varchar(2) DEFAULT NULL,
 PRIMARY KEY (`LOGON_CACHE`,`LOGON_NDX`),
 KEY `IX_ZUCACHEM` (`LOGON_CACHE`,`LOGON_NDX`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUCOLUTM` (
 `TABLE_NAME` varchar(20) NOT NULL ,
 `COLUMN_NAME` varchar(50) NOT NULL ,
 `AUTO_INCREMENT` bit NOT NULL  DEFAULT (0),
 `COLUMN_NULLABLE` bit NOT NULL  DEFAULT (0),
 `COLUMN_CLASS_CODE` varchar(50) DEFAULT NULL,
 `COLUMN_DEFAULT` varchar(50) DEFAULT NULL,
 `COLUMN_LENGTH` int,
 `COLUMN_USAGE` bit NOT NULL  DEFAULT (0),
 `COLUMN_TP_CODE` varchar(50) DEFAULT NULL,
 `COLUMN_PK_BIT` bit NOT NULL  DEFAULT (0),
 `COLUMN_SCALE` int,
 `LABEL_ID` varchar(50) DEFAULT NULL,
 `VERFY_BIT` bit NOT NULL  DEFAULT (0),
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TABLE_NAME`,`COLUMN_NAME`),
 KEY `IX_ZUCOLUTM` (`TABLE_NAME`,`COLUMN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUDATCDM` (
 `TABLE_NAME` varchar(20) NOT NULL ,
 `TABLE_NAME01` varchar(40) DEFAULT NULL,
 `TABLE_NAME02` varchar(40) DEFAULT NULL,
 `TABLE_NAME03` varchar(40) DEFAULT NULL,
 `TABLE_NAME04` varchar(40) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TABLE_NAME`),
 KEY `IX_ZUDATCDM` (`TABLE_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZULABELM` (
 `LABEL_ID` varchar(50) NOT NULL ,
 `LANG_CODE` varchar(8) NOT NULL  DEFAULT '(CHS)',
 `UID_CODE` varchar(20) NOT NULL  DEFAULT '(Default)',
 `LANG_NAME` varchar(200) DEFAULT NULL,
 `LOCK_BIT` bit NOT NULL  DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LABEL_ID`,`LANG_CODE`,`UID_CODE`),
 KEY `IX_ZULABELM` (`LABEL_ID`,`LANG_CODE`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZULNKTBM` (
 `LNK_UID_CODE` varchar(20) NOT NULL ,
 `UID_CODE` varchar(20) NOT NULL ,
 `TABLE_NAME` varchar(20) DEFAULT NULL,
 `COLUMN_NAME` varchar(20) DEFAULT NULL,
 `LNK_TABLE_NAME` varchar(20) DEFAULT NULL,
 `LNK_COLUMN_NAME` varchar(20) DEFAULT NULL,
 `LNK_TP_CODE` varchar(20) DEFAULT NULL,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LNK_UID_CODE`,`UID_CODE`),
 KEY `IX_ZULNKTBM` (`LNK_UID_CODE`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUMUTBLM` (
 `LNK_UID_CODE` varchar(20) NOT NULL ,
 `UID_CODE` varchar(20) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `ICON_NAME` varchar(50) DEFAULT NULL,
 `LABEL_ID` varchar(30) DEFAULT NULL,
 `ORDINAL` int,
 `COLUMN_NUM` int,
 `VOPT_CODE` varchar(50) DEFAULT NULL,
 `VURL_CODE` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LNK_UID_CODE`,`UID_CODE`),
 KEY `IX_ZUMUTBLM` (`LNK_UID_CODE`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUODTPTM` (
 `ODTP_CODE` varchar(15) NOT NULL ,
 `ODTP_CLASS_CODE` varchar(15) DEFAULT NULL,
 `ODTP_SYSTEM` varchar(50) DEFAULT NULL,
 `ODTP_NAME01` varchar(50) DEFAULT NULL,
 `ODTP_NAME02` varchar(50) DEFAULT NULL,
 `PREFIX_CODE` varchar(40) DEFAULT NULL,
 `COMP_CODE` varchar(12) DEFAULT NULL,
 `XDIR_CODE` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`ODTP_CODE`),
 KEY `IX_ZUODTPTM` (`ODTP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPANELM` (
 `LNK_UID_CODE` varchar(20) NOT NULL ,
 `UID_CODE` varchar(20) NOT NULL ,
 `LABEL_ID` varchar(30) DEFAULT NULL,
 `ORDINAL` int,
 `STATUS_CODE` varchar(20) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`LNK_UID_CODE`,`UID_CODE`),
 KEY `IX_ZUPANELM` (`LNK_UID_CODE`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPKGTBM` (
 `PKG_CODE` varchar(20) NOT NULL ,
 `UID_CODE` varchar(20) NOT NULL ,
 `MODULE_CODE` varchar(32) DEFAULT NULL,
 `PKG_TP_CODE` varchar(20) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT NULL,
 `UID_MD5_CODE` varchar(32) DEFAULT NULL,
 `UID_VER_CODE` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PKG_CODE`,`UID_CODE`),
 KEY `IX_ZUPKGTBM` (`PKG_CODE`,`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPMRTBM` (
 `PMR_NO` varchar(50) NOT NULL ,
 `UID_CODE` varchar(50) DEFAULT NULL,
 `PMR_DATE` datetime,
 `PMR_RMKS` longtext DEFAULT NULL,
 `PMR_CONT` longtext DEFAULT NULL,
 `PMR_USER` varchar(50) DEFAULT NULL,
 `PMR_CFM` varchar(50) DEFAULT NULL,
 `PMR_STATUS` varchar(50) DEFAULT NULL,
 `PMR_TAG` varchar(50) DEFAULT NULL,
 `PMR_TITLE` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`PMR_NO`),
 KEY `IX_ZUPMRTBM` (`PMR_NO`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPREFXM` (
 `PREFIX_CODE` varchar(40) NOT NULL ,
 `PREFIX_NAME01` varchar(50) DEFAULT NULL,
 `PREFIX_NAME02` varchar(50) DEFAULT NULL,
 `PREFIX_DATA` varchar(30) DEFAULT NULL,
 `PREFIX_CN` int,
 `PREFIX_CLASS_CODE` varchar(12) DEFAULT NULL,
 `PREFIX_TP_CODE` varchar(20) DEFAULT NULL,
 `TOTAL_WIDTH` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`PREFIX_CODE`),
 KEY `IX_ZUPREFXM` (`PREFIX_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPRGDTM` (
 `UID_CODE` varchar(20) NOT NULL ,
 `DTL_NDX` int NOT NULL ,
 `ACTIVE_BIT` bit NOT NULL  DEFAULT (0),
 `COLUMN_NULLABLE` bit NOT NULL  DEFAULT (0),
 `STAGEU_STATUS` varchar(20) DEFAULT NULL,
 `BASE_TABLE_NAME` varchar(20) DEFAULT NULL,
 `BASE_COLUMN_NAME` varchar(20) DEFAULT NULL,
 `TABLE_NAME` varchar(50) DEFAULT NULL,
 `COLUMN_NAME` varchar(50) DEFAULT NULL,
 `COLUMN_HEIGHT` int,
 `COLUMN_WIDTH` int,
 `COLUMN_CLASS_CODE` varchar(20) DEFAULT NULL,
 `COLUMN_TP_CODE` varchar(10) DEFAULT NULL,
 `COLUMN_CAT_CODE` varchar(50) DEFAULT '()',
 `COLS_SPAN` int,
 `ROWS_SPAN` int,
 `INIT_CODE` varchar(20) DEFAULT NULL,
 `LABEL_ID` varchar(50) DEFAULT NULL,
 `LINE_REVEAL` bit NOT NULL  DEFAULT (0),
 `LNK_COLUMN_NAME` varchar(50) DEFAULT NULL,
 `NEW_CELL` bit NOT NULL  DEFAULT (0),
 `NEW_LINE` bit NOT NULL  DEFAULT (0),
 `OPT_CODE` varchar(50) DEFAULT NULL,
 `ORDINAL` int,
 `REA_UID_CODE` varchar(50) DEFAULT NULL,
 `RELY_DEFAULT` varchar(50) DEFAULT NULL,
 `DATA_VIEWER` varchar(50) DEFAULT NULL,
 `RELY_VERFY` varchar(50) DEFAULT NULL,
 `RELY_VIEW` varchar(50) DEFAULT NULL,
 `UPDATE_BIT` bit NOT NULL  DEFAULT (0),
 `USQL_CODE` varchar(50) DEFAULT NULL,
 `VERFY_BIT` bit NOT NULL  DEFAULT (0),
 `XLNK_COLUMN` bit DEFAULT (0),
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `UID_DT` varchar(18) NOT NULL ,
 `SERIAL_NO` int,
 PRIMARY KEY (`UID_DT`),
 KEY `IX_ZUPRGDTM` (`UID_DT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUPRGHDM` (
 `UID_CODE` varchar(20) NOT NULL ,
 `ABBR_NAME` varchar(20) DEFAULT NULL,
 `ACTIVE_BIT` bit DEFAULT NULL,
 `LNK_UID_CODE` varchar(20) DEFAULT NULL,
 `PK_TP_CODE` varchar(8) DEFAULT NULL,
 `PK_COLUMN_NAME` varchar(50) DEFAULT NULL,
 `UID_TP_CODE` varchar(8) DEFAULT NULL,
 `TABLE_NAME` varchar(50) DEFAULT NULL,
 `UGET_CODE` varchar(50) DEFAULT NULL,
 `RFX_UID_CODE` varchar(20) DEFAULT NULL,
 `USQL_CODE` varchar(20) DEFAULT NULL,
 `USQL_CODE_D` varchar(50) DEFAULT NULL,
 `UID_MD5_CODE` varchar(32) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UID_CODE`),
 KEY `IX_ZUPRGHDM` (`UID_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUREFDTM` (
 `REFX_CODE` varchar(20) NOT NULL ,
 `TABLE_NAME` varchar(50) NOT NULL ,
 `COLUMN_NAME` varchar(50) NOT NULL ,
 `ACCESS_TABLE_NAME` varchar(50) NOT NULL ,
 `ACCESS_COLUMN_NAME` varchar(50) NOT NULL ,
 `ACCESS_FORMULA` varchar(200) DEFAULT NULL,
 `ACCESS_TP_CODE` varchar(20) DEFAULT NULL,
 `ACCESS_WHERE_DATA` varchar(50) DEFAULT NULL,
 `FORCE_BIT` bit DEFAULT (0),
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REFX_CODE`,`TABLE_NAME`,`COLUMN_NAME`,`ACCESS_TABLE_NAME`,`ACCESS_COLUMN_NAME`),
 KEY `IX_ZUREFDTM` (`REFX_CODE`,`TABLE_NAME`,`COLUMN_NAME`,`ACCESS_TABLE_NAME`,`ACCESS_COLUMN_NAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUREFHDM` (
 `REFX_CODE` varchar(20) NOT NULL ,
 `TABLE_NAME` varchar(50) DEFAULT NULL,
 `USQL_CODE` varchar(50) DEFAULT NULL,
 `WHERE_CLAUSE` longtext DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`REFX_CODE`),
 KEY `IX_ZUREFHDM` (`REFX_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUSQLDTM` (
 `USQL_CODE` varchar(20) NOT NULL ,
 `DTL_NDX` varchar(10) NOT NULL ,
 `LOGON_ID` varchar(12) NOT NULL ,
 `ACTIVE_BIT` bit DEFAULT (0),
 `TABLE_NAME` varchar(50) DEFAULT NULL,
 `COLUMN_NAME` varchar(50) DEFAULT NULL,
 `ALIAS_NAME` varchar(50) DEFAULT NULL,
 `USQL_FORMULA` varchar(100) DEFAULT NULL,
 `UGET_CODE` varchar(20) DEFAULT NULL,
 `LABEL_ID` varchar(50) DEFAULT NULL,
 `ORDINAL` int,
 `USQL_TAG01` varchar(50) DEFAULT NULL,
 `USQL_TAG02` varchar(50) DEFAULT NULL,
 `COLUMN_TP_CODE` varchar(50) DEFAULT NULL,
 `SUGGT_BIT` bit DEFAULT NULL,
 `STATUS_CODE` varchar(50) DEFAULT NULL,
 `LNK_UID_CODE` varchar(50) DEFAULT NULL,
 `LNK_USQL_DATA` varchar(50) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`USQL_CODE`,`DTL_NDX`,`LOGON_ID`),
 KEY `IX_ZUSQLDTM` (`USQL_CODE`,`DTL_NDX`,`LOGON_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUSQLHDM` (
 `USQL_CODE` varchar(20) NOT NULL ,
 `DISTINCT_BIT` bit DEFAULT (0),
 `FROM_CLAUSE` longtext DEFAULT NULL,
 `ORDER_CLAUSE` longtext DEFAULT NULL,
 `GROUP_CLAUSE` longtext DEFAULT NULL,
 `WHERE_CLAUSE` longtext DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`USQL_CODE`),
 KEY `IX_ZUSQLHDM` (`USQL_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUSTATBM` (
 `STATUS_MODE` varchar(50) NOT NULL ,
 `STATUS_FUNS_CODE` varchar(50) NOT NULL ,
 `STATUS_CODE_FM` varchar(50) NOT NULL ,
 `STATUS_CODE_TO` varchar(20) DEFAULT NULL,
 `STATUS_ACCEPT_BIT` bit DEFAULT NULL,
 `STATUS_RMKS` varchar(50) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`STATUS_MODE`,`STATUS_FUNS_CODE`,`STATUS_CODE_FM`),
 KEY `IX_ZUSTATBM` (`STATUS_MODE`,`STATUS_FUNS_CODE`,`STATUS_CODE_FM`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUSTATEM` (
 `LANG_CODE` varchar(25) NOT NULL ,
 `STATE_CODE` varchar(50) NOT NULL ,
 `STATE_NAME` varchar(100) DEFAULT NULL,
 `STATE_XREF` varchar(100) DEFAULT NULL,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 PRIMARY KEY (`LANG_CODE`,`STATE_CODE`),
 KEY `IX_ZUSTATEM` (`LANG_CODE`,`STATE_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUSTATUM` (
 `STATUS_MODE` varchar(50) NOT NULL ,
 `STATUS_CODE` varchar(20) NOT NULL ,
 `STATUS_ATVT` varchar(50) NOT NULL ,
 `STATUS_NAME` varchar(50) DEFAULT NULL,
 `STATUS_CAPTION` varchar(50) DEFAULT NULL,
 `STATUS_ACCEPT_BIT` bit DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`STATUS_MODE`,`STATUS_CODE`,`STATUS_ATVT`),
 KEY `IX_ZUSTATUM` (`STATUS_MODE`,`STATUS_CODE`,`STATUS_ATVT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUTRNTPM` (
 `TRANS_TP_CODE` varchar(8) NOT NULL ,
 `TRANS_CLASS_CODE` varchar(40) DEFAULT NULL,
 `TRANS_TP_NAME01` varchar(40) DEFAULT NULL,
 `TRANS_TP_NAME02` varchar(40) DEFAULT NULL,
 `TRANS_TP_NAME03` varchar(40) DEFAULT NULL,
 `TRANS_TP_NAME04` varchar(40) DEFAULT NULL,
 `SIGN_CODE` varchar(8) DEFAULT NULL,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`TRANS_TP_CODE`),
 KEY `IX_ZUTRNTPM` (`TRANS_TP_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `ZUUGETBM` (
 `UGET_CODE` varchar(50) NOT NULL ,
 `REFX_CODE` varchar(50) NOT NULL ,
 `ORDINAL` int,
 `ZSECURITY_CODE1` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE2` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE3` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE4` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE5` varchar(12) DEFAULT NULL,
 `ZSECURITY_CODE6` varchar(12) DEFAULT NULL,
 `ZSECURITY_RIGHT` int,
 `ZADD_DATE` datetime,
 `ZADD_USER` varchar(12) DEFAULT NULL,
 `ZCHG_DATE` datetime,
 `ZCHG_USER` varchar(12) DEFAULT NULL,
 `ZCHG_FLAG` varchar(18) DEFAULT NULL,
 PRIMARY KEY (`UGET_CODE`,`REFX_CODE`),
 KEY `IX_ZUUGETBM` (`UGET_CODE`,`REFX_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

